mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 882164 - Enter the right compartment to create a new JSObject in nsHTMLDocument::GetAll; r=bz
This commit is contained in:
parent
3e79cdd903
commit
8742f29802
@ -2724,8 +2724,10 @@ JSObject*
|
||||
nsHTMLDocument::GetAll(JSContext* aCx, ErrorResult& aRv)
|
||||
{
|
||||
if (!mAll) {
|
||||
JS::Rooted<JSObject*> wrapper(aCx, GetWrapper());
|
||||
JSAutoCompartment ac(aCx, wrapper);
|
||||
mAll = JS_NewObject(aCx, &sHTMLDocumentAllClass, nullptr,
|
||||
JS_GetGlobalForObject(aCx, GetWrapper()));
|
||||
JS_GetGlobalForObject(aCx, wrapper));
|
||||
if (!mAll) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user