Bug 1523997 - Skip checking for -moz-binding in Element::WrapObject when in the content process r=bzbarsky

Differential Revision: https://phabricator.services.mozilla.com/D18124
This commit is contained in:
Brian Grinstead
2019-01-31 04:24:14 +00:00
parent cd3f474736
commit 062e7b66cd

View File

@@ -544,6 +544,11 @@ JSObject* Element::WrapObject(JSContext* aCx,
return nullptr;
}
if (XRE_IsContentProcess() && !NodePrincipal()->IsSystemPrincipal()) {
// We don't use XBL in content privileged content processes.
return obj;
}
Document* doc = GetComposedDoc();
if (!doc) {
// There's no baseclass that cares about this call so we just