Closed Bug 1157255 Opened 6 years ago Closed 6 years ago

Listener uses try…catch to export symbols on sandbox

Categories

(Testing :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

(Keywords: pi-marionette-server)

Attachments

(1 file, 1 obsolete file)

When we bind properties and functions to the sandbox, we changed this to look at the symbol's type instead of try…catch.  This was believed to have performance benefits.

We should do the same thing as chrome space is doing in content space.

The affected function is createExecuteContentSandbox.
Attached file MozReview Request: bz://1157255/ato (obsolete) —
/r/7789 - Bug 1157255: Use typeof to determine MarionetteObj exports

Pull down this commit:

hg pull -r 57ef9050a8ad9bce6cf75381aa8785e996741ffe https://reviewboard-hg.mozilla.org/gecko/
Attachment #8598818 - Flags: review?(dburns)
Comment on attachment 8598818 [details]
MozReview Request: bz://1157255/ato

https://reviewboard.mozilla.org/r/7787/#review6577

::: testing/marionette/listener.js:471
(Diff revision 1)
> -  if (aWindow.wrappedJSObject.SpecialPowers != undefined) {
> +  let sb = new Cu.Sandbox(win, {sandboxPrototype: win});

expand `sb` to `sandbox` so that it is easier to understand what it is later on in the code

::: testing/marionette/listener.js:488
(Diff revision 1)
> +  let spfn;

can we expand the variable name for `spfn`. I am guessing it means special powers function but it might not be...
Attachment #8598818 - Flags: review?(dburns)
Assignee: nobody → ato
Status: NEW → ASSIGNED
Attachment #8598818 - Flags: review?(dburns)
Comment on attachment 8598818 [details]
MozReview Request: bz://1157255/ato

/r/7789 - Bug 1157255: Use typeof to determine MarionetteObj exports

Pull down this commit:

hg pull -r 920069f09328b57adad36827b4f67a28aedfdb1d https://reviewboard-hg.mozilla.org/gecko/
Comment on attachment 8598818 [details]
MozReview Request: bz://1157255/ato

https://reviewboard.mozilla.org/r/7787/#review6637

Ship It!
Attachment #8598818 - Flags: review?(dburns) → review+
https://hg.mozilla.org/mozilla-central/rev/84a655fda7a2
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Attachment #8598818 - Attachment is obsolete: true
Attachment #8620110 - Flags: review+
You need to log in before you can comment on or make changes to this bug.