зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1398601 - Fix wunused-variable errors when MOZ_DIAGNOSTIC_ASSERT isn't available. a=RyanVM
MozReview-Commit-ID: 1kvKcQBqog9
This commit is contained in:
Родитель
ee9c23d822
Коммит
9b5f5a54bb
|
@ -211,9 +211,11 @@ EvalScript(JSContext* cx,
|
||||||
// NOTE: If loadScope is already a shared-global JSM, we can't
|
// NOTE: If loadScope is already a shared-global JSM, we can't
|
||||||
// determine which JSM the target belongs to and have to assume it
|
// determine which JSM the target belongs to and have to assume it
|
||||||
// is in our JSM.
|
// is in our JSM.
|
||||||
|
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||||
JSObject* targetGlobal = js::GetGlobalForObjectCrossCompartment(targetObj);
|
JSObject* targetGlobal = js::GetGlobalForObjectCrossCompartment(targetObj);
|
||||||
MOZ_DIAGNOSTIC_ASSERT(!mozJSComponentLoader::Get()->IsLoaderGlobal(targetGlobal),
|
MOZ_DIAGNOSTIC_ASSERT(!mozJSComponentLoader::Get()->IsLoaderGlobal(targetGlobal),
|
||||||
"Don't load subscript into target in a shared-global JSM");
|
"Don't load subscript into target in a shared-global JSM");
|
||||||
|
#endif
|
||||||
if (!JS::CloneAndExecuteScript(cx, envChain, script, retval)) {
|
if (!JS::CloneAndExecuteScript(cx, envChain, script, retval)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче