Bug 873253 Crash clicking on file input in XUL whitelisted site r=bz

This commit is contained in:
Bobby Holley 2013-05-16 23:57:18 +01:00
parent 7759fb1944
commit 2e42030f56

View File

@ -2397,7 +2397,7 @@ nsINode::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aScope)
JS::Rooted<JSObject*> obj(aCx, WrapNode(aCx, aScope));
if (obj && ChromeOnlyAccess() &&
!nsContentUtils::IsSystemPrincipal(NodePrincipal()) &&
xpc::AllowXBLScope(js::GetContextCompartment(aCx)))
xpc::AllowXBLScope(js::GetObjectCompartment(obj)))
{
// Create a new wrapper and cache it.
JSAutoCompartment ac(aCx, obj);