Evaluating an expression with a private method access while paused in a class method throws
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | verified |
People
(Reporter: mgaudet, Assigned: mgaudet)
References
Details
Attachments
(3 files)
+++ This bug was initially created as a clone of Bug #1709542 +++
Steps to reproduce
- Go to https://firefox-devtools-private-fields.glitch.me/
- Open the console
- In the page, click on the
Create instance and pause
button, this should pause - In the console, evaluate
this.#getSalt()
Expected results
A result is displayed in the console
Actual results
The evaluation throws with:
Uncaught Error: private method calls aren't available in this context
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
The attached patch is incomplete, and will need more work before we can finish this up.
Assignee | ||
Comment 3•4 years ago
|
||
The attached patch works for Private Methods, in at least one context. However, it's still enormously incomplete, and I don't think I plan on tackling this in the short-term
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
This ensures that we have access to static methods in Debugger.frame.evalInFrame;
If we don't close over, then the debugger seems to return undefined when trying
to load the private binding off of the class, which then causes CheckPrivateField
to assert.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D116178
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0f2f7d2c7612
https://hg.mozilla.org/mozilla-central/rev/2074ae57ca34
https://hg.mozilla.org/mozilla-central/rev/ea02687ba7fe
Updated•4 years ago
|
Comment 9•4 years ago
|
||
I have reproduced the issue using an affected Nightly build 90.0a1 (20210506092558) on Windows 10x64.
Verified fixed with Firefox 91.0b8 (20210727185725) on Windows 10x64, macOS 10.15 and Ubuntu 20.04.
Description
•