Closed Bug 1523997 Opened 10 months ago Closed 10 months ago

Don't get computed styles in Element::WrapObject in the content process (no need to check for XBL binding)

Categories

(Core :: DOM: Core & HTML, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

Attachments

(1 file)

We could either early return in WrapObject (https://searchfox.org/mozilla-central/rev/78cd247b5d7a08832f87d786541d3e2204842e8e/dom/base/Element.cpp#554) or return false in MayNeedToLoadXBLBinding (https://searchfox.org/mozilla-central/rev/78cd247b5d7a08832f87d786541d3e2204842e8e/dom/base/Element.cpp#508) when in the content process (XRE_IsContentProcess()).

The effect would be we don't enter this block which needs to read computed style to check for -moz-binding: https://searchfox.org/mozilla-central/rev/78cd247b5d7a08832f87d786541d3e2204842e8e/dom/base/Element.cpp#531-536.

Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED

I'll do a try push, but I think this will break various tests in automation that load XUL/XBL in the content process. Similar to how https://phabricator.services.mozilla.com/D18027 (bug 1523712) needs to allow -moz-binding in tests via a pref.

FWIW in Bug 1465457 we're planning to load chrome/XUL specific reftests in the parent process, but I'm guessing this is an issue across more than just reftests.

(In reply to Brian Grinstead [:bgrins] from comment #1)

I'll do a try push, but I think this will break various tests in automation that load XUL/XBL in the content process. Similar to how https://phabricator.services.mozilla.com/D18027 (bug 1523712) needs to allow -moz-binding in tests via a pref.

Hm, this is surprisingly green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4f3234dc68433caf2091375c7747fbc70c0d7cfd.

Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28cd229556d1
Skip checking for -moz-binding in Element::WrapObject when in the content process r=bzbarsky
Blocks: war-on-xbl
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Component: DOM → DOM: Core & HTML
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.