Fix accessing the bootstrap methods when they are declared in the new lexical scope

RESOLVED FIXED in mozilla44

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mossop, Assigned: mossop)

Tracking

Trunk
mozilla44
Points:
---

Firefox Tracking Flags

(firefox44 affected)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Bug 1202902 broke some bootstrap add-ons because their startup (and other) functions were declared with let and const and so didn't appear on the global sandbox object we load the scripts into. It turns out there is a way to access them in the new scope though so we can get these add-ons working again.
(Assignee)

Comment 1

3 years ago
Created attachment 8676977 [details]
MozReview Request: Bug 1217070: Fix accessing the bootstrap methods when they are declared in the new lexical scope. r?rhelmer

Bug 1217070: Fix accessing the bootstrap methods when they are declared in the new lexical scope. r?rhelmer

Rather that trying to get the method from the sandbox global object which will
only work for var and function declared methods instead evaluate the function
name in the sandbox scope and get the result which will give us access to the
lexical scope.
Attachment #8676977 - Flags: review?(rhelmer)
Attachment #8676977 - Flags: review?(rhelmer) → review+
Comment on attachment 8676977 [details]
MozReview Request: Bug 1217070: Fix accessing the bootstrap methods when they are declared in the new lexical scope. r?rhelmer

https://reviewboard.mozilla.org/r/22843/#review20543
It appears this merged to m-c without updating the bug:

https://hg.mozilla.org/mozilla-central/rev/ccb7bb578fb1
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.