Bug 1425077 - Make ModuleScript::SetErrorToRethrow call HoldJSObjects in case there is no module record r=baku

This commit is contained in:
Jon Coppeard 2017-12-21 16:59:12 +00:00
parent f6f7ecd4e3
commit 66cb694a8d

View File

@ -102,6 +102,10 @@ ModuleScript::SetErrorToRethrow(const JS::Value& aError)
MOZ_ASSERT(!aError.isUndefined());
MOZ_ASSERT(!HasErrorToRethrow());
// This is only called after SetModuleRecord() or SetParseError() so we don't
// need to call HoldJSObjects() here.
MOZ_ASSERT(mModuleRecord || HasParseError());
mErrorToRethrow = aError;
}