Bug 1398601 - Fix wunused-variable errors when MOZ_DIAGNOSTIC_ASSERT isn't available. a=RyanVM

MozReview-Commit-ID: 1kvKcQBqog9
This commit is contained in:
Ted Campbell 2017-09-14 06:35:00 -04:00
Родитель ee9c23d822
Коммит 9b5f5a54bb
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -211,9 +211,11 @@ EvalScript(JSContext* cx,
// NOTE: If loadScope is already a shared-global JSM, we can't
// determine which JSM the target belongs to and have to assume it
// is in our JSM.
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
JSObject* targetGlobal = js::GetGlobalForObjectCrossCompartment(targetObj);
MOZ_DIAGNOSTIC_ASSERT(!mozJSComponentLoader::Get()->IsLoaderGlobal(targetGlobal),
"Don't load subscript into target in a shared-global JSM");
#endif
if (!JS::CloneAndExecuteScript(cx, envChain, script, retval)) {
return false;
}