From: Kevin Carhart <kevin@carhart.net>
To: edbrowse-dev@lists.the-brannons.com
Subject: [edbrowse-dev] 'this' in a breakpoint
Date: Tue, 4 Jun 2019 22:20:52 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.21.1906042209080.211189@carhart.net> (raw)
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
next reply other threads:[~2019-06-05 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 5:20 Kevin Carhart [this message]
2019-06-05 5:49 ` [edbrowse-dev] " Kevin Carhart
2019-06-05 7:07 ` [edbrowse-dev] " Karl Dahlke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1906042209080.211189@carhart.net \
--to=kevin@carhart.net \
--cc=edbrowse-dev@lists.the-brannons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).