Closed Bug 1709956 Opened 3 years ago Closed 3 years ago

Evaluating an expression with a private method access while paused in a class method throws

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

VERIFIED FIXED
91 Branch
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

  1. Go to https://firefox-devtools-private-fields.glitch.me/
  2. Open the console
  3. In the page, click on the Create instance and pause button, this should pause
  4. 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

The attached patch is incomplete, and will need more work before we can finish this up.

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

Severity: -- → S3
Priority: -- → P3
Attachment #9220704 - Attachment description: WIP: Bug 1709956 - Attempt to support invoking private methods → WIP: Bug 1709956 - Support invoking private methods in Debugger.frame.eval
Depends on: 1712393

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.

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Attachment #9220704 - Attachment description: WIP: Bug 1709956 - Support invoking private methods in Debugger.frame.eval → Bug 1709956 - Support invoking private methods in Debugger.frame.eval r?arai
See Also: → 1713337
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0f2f7d2c7612 Close over all private methods, not just instance methods r=arai https://hg.mozilla.org/integration/autoland/rev/2074ae57ca34 Add privateBrandSlot helper r=arai https://hg.mozilla.org/integration/autoland/rev/ea02687ba7fe Support invoking private methods in Debugger.frame.eval r=arai
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

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.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: