Bug 1086996 - Stop wrapping XBL handlers into the content compartment. r=bz

This commit is contained in:
Bobby Holley 2014-10-22 15:13:15 +02:00
parent ce72a9e2b9
commit 95861609ac

View File

@ -312,12 +312,6 @@ nsXBLPrototypeHandler::ExecuteHandler(EventTarget* aTarget,
JS::Rooted<JSObject*> bound(cx, JS_CloneFunctionObject(cx, genericHandler, target));
NS_ENSURE_TRUE(bound, NS_ERROR_FAILURE);
// Now, wrap the bound handler into the content compartment and use it.
JSAutoCompartment ac2(cx, globalObject);
if (!JS_WrapObject(cx, &bound)) {
return NS_ERROR_FAILURE;
}
nsRefPtr<EventHandlerNonNull> handlerCallback =
new EventHandlerNonNull(bound, /* aIncumbentGlobal = */ nullptr);