edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [edbrowse-dev] 'this' in a breakpoint
@ 2019-06-05  5:20 Kevin Carhart
  2019-06-05  5:49 ` [edbrowse-dev] " Kevin Carhart
  2019-06-05  7:07 ` [edbrowse-dev] " Karl Dahlke
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Carhart @ 2019-06-05  5:20 UTC (permalink / raw)
  To: edbrowse-dev


I think 'this' is always returning window within a breakpoint.  So if you 
have to echo let's say, a, where a = (this, b), I think you would get a 
result that didn't reflect the real run.

To recreate, try it with jsrt

I went to the Circle function and added an alert that produces the 
following:

when jsrt is run with no breakpoints, what is 'this' in function Circle? 
[object Object]

And I assigned window.preserve_this = this
Then I echoed preserve_this from jdb:
jdb
preserve_this
[object Object]
ok(preserve_this)
r,c,a,q


Now I restored Circle, so jsrt is back to factory settings.
Now I put a breakpoint in Circle and echoed 'this' at the breakpoint 
prompt.

b base
24269
bp: this
[object global]

Do you think my experiment is sound and can this be alleviated?

thanks
Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-05  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05  5:20 [edbrowse-dev] 'this' in a breakpoint Kevin Carhart
2019-06-05  5:49 ` [edbrowse-dev] " Kevin Carhart
2019-06-05  7:07 ` [edbrowse-dev] " Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).