Bug 1739603 - only define variable in BytecodeCompiler.cpp for configurations which use it. r=nbp DONTBUILD

Bug 1721849 added 'data' variable which only got called by assertions which are
ignore in opt builds outside Nightly and causes the build to report 'data' as
unused variable.

Differential Revision: https://phabricator.services.mozilla.com/D130456
This commit is contained in:
Sebastian Hengst 2021-11-05 18:55:02 +00:00
Родитель fca6bc6241
Коммит cfe77b2206
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -1186,11 +1186,13 @@ template <typename Unit>
static UniquePtr<CompilationStencil> DelazifyCanonicalScriptedFunctionImpl(
JSContext* cx, CompilationStencil& context, ScriptIndex scriptIndex) {
ScriptStencilRef script{context, scriptIndex};
const ScriptStencil& data = script.scriptData();
const ScriptStencilExtra& extra = script.scriptExtra();
#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION) || defined(DEBUG)
const ScriptStencil& data = script.scriptData();
MOZ_ASSERT(!data.hasSharedData(), "Script is already compiled!");
MOZ_DIAGNOSTIC_ASSERT(!data.isGhost());
#endif
AutoIncrementalTimer timer(cx->realm()->timers.delazificationTime);