Open Bug 1702038 Opened 4 years ago Updated 4 years ago

Provide private name access in Debugger.frame.eval

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

Tracking Status
firefox-esr78 --- unaffected
firefox87 --- unaffected
firefox88 --- unaffected
firefox89 --- fix-optional

People

(Reporter: mgaudet, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Bug 1662559 improved the storage mechanism for private methods quite substantially. However, we chose in this patch to defer implementing support for Debugger.frame.eval in this patch, regressing our previous support.

There are two major problems:

  1. Debug.Frame.eval has a problematic scope chain, as described in Bug 1638309, Comment 1. We are able to mostly work around this (see ScopeContext::cachePrivateFieldsForEval), and correctly determine which bindings are private fields and which are private methods (and require brand checking), as well as the appropriate environment coordinate.

    However, the environment chain includes DebugEnvironmentProxy objects which our current implementation of GetAliasedVar cannot see through. It seems likely to me that correctly handling this will require a 1-of bytecode to be able to correctly handle this case.

  2. The other problem is that we do not populate the private field eval cache for delazifications, because populating this cache requires walking scope chains. So in order to handle this we need to store the required information in the delazified script representation to avoid having to walk the scope chain again on delazification.

Fixing this bug will allow us to remove the cases where we throw JSMSG_DEBUG_NO_PRIVATE_METHOD

Severity: -- → S3
Priority: -- → P3

The Bugbug bot thinks this bug is a defect, but please change it back in case of error.

Type: enhancement → defect

Set release status flags based on info from the regressing bug 1662559

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.