зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1617851: Add location information to Ion abort messages in non-debug mode. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D64043 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
28946d1b1d
Коммит
b6041d5096
|
@ -1850,8 +1850,10 @@ static bool ScriptIsTooLarge(JSContext* cx, JSScript* script) {
|
|||
: JitOptions.ionMaxLocalsAndArgsMainThread;
|
||||
|
||||
if (script->length() > maxScriptSize || numLocalsAndArgs > maxLocalsAndArgs) {
|
||||
JitSpew(JitSpew_IonAbort, "Script too large (%zu bytes) (%zu locals/args)",
|
||||
script->length(), numLocalsAndArgs);
|
||||
JitSpew(JitSpew_IonAbort,
|
||||
"Script too large (%zu bytes) (%zu locals/args) @ %s:%u:%u",
|
||||
script->length(), numLocalsAndArgs, script->filename(),
|
||||
script->lineno(), script->column());
|
||||
TrackIonAbort(cx, script, script->code(), "too large");
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -190,12 +190,15 @@ IonBuilder::IonBuilder(JSContext* analysisContext, MIRGenerator& mirGen,
|
|||
|
||||
mozilla::GenericErrorResult<AbortReason> IonBuilder::abort(AbortReason r) {
|
||||
auto res = mirGen_.abort(r);
|
||||
unsigned line, column;
|
||||
#ifdef DEBUG
|
||||
JitSpew(JitSpew_IonAbort, "aborted @ %s:%d", script()->filename(),
|
||||
PCToLineNumber(script(), pc));
|
||||
line = PCToLineNumber(script(), pc, &column);
|
||||
#else
|
||||
JitSpew(JitSpew_IonAbort, "aborted @ %s", script()->filename());
|
||||
line = script()->lineno();
|
||||
column = script()->column();
|
||||
#endif
|
||||
JitSpew(JitSpew_IonAbort, "aborted @ %s:%u:%u", script()->filename(), line,
|
||||
column);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -207,12 +210,15 @@ mozilla::GenericErrorResult<AbortReason> IonBuilder::abort(AbortReason r,
|
|||
va_start(ap, message);
|
||||
auto res = mirGen_.abortFmt(r, message, ap);
|
||||
va_end(ap);
|
||||
unsigned line, column;
|
||||
#ifdef DEBUG
|
||||
JitSpew(JitSpew_IonAbort, "aborted @ %s:%d", script()->filename(),
|
||||
PCToLineNumber(script(), pc));
|
||||
line = PCToLineNumber(script(), pc, &column);
|
||||
#else
|
||||
JitSpew(JitSpew_IonAbort, "aborted @ %s", script()->filename());
|
||||
line = script()->lineno();
|
||||
column = script()->column();
|
||||
#endif
|
||||
JitSpew(JitSpew_IonAbort, "aborted @ %s:%u:%u", script()->filename(), line,
|
||||
column);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче