Skip to content

Commit

Permalink
Add JSAutoCompartment to GetNPObjectWrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfbeast committed Dec 13, 2016
1 parent d023841 commit 57b4663
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dom/plugins/base/nsJSNPRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,8 @@ GetNPObjectWrapper(JSContext *cx, JSObject *aObj, bool wrapResult = true)
}
return obj;
}

JSAutoCompartment ac(cx, obj);
if (!::JS_GetPrototype(cx, obj, &obj)) {
return nullptr;
}
Expand Down

0 comments on commit 57b4663

Please sign in to comment.