From 062e7b66cdedbc26f08803fff5efbb890cef6fdc Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Thu, 31 Jan 2019 04:24:14 +0000 Subject: [PATCH] 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 --- dom/base/Element.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index bb05332fa85f..acfc992aee0b 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -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