Commit d617ebbc authored by Shu-yu Guo's avatar Shu-yu Guo
Browse files

Bug 1250520 - Handle reporting DebuggeeWouldRun when the script has no filename. (r=fitzgen)

parent 40e28dfd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -346,12 +346,13 @@ class MOZ_RAII js::EnterDebuggeeNoExecute
                    fprintf(stdout, "Dumping stack for DebuggeeWouldRun:\n");
                    DumpBacktrace(cx);
                }
                const char* filename = script->filename() ? script->filename() : "(none)";
                char linenoStr[15];
                JS_snprintf(linenoStr, sizeof(linenoStr), "%" PRIuSIZE, script->lineno());
                unsigned flags = warning ? JSREPORT_WARNING : JSREPORT_ERROR;
                return JS_ReportErrorFlagsAndNumber(cx, flags, GetErrorMessage, nullptr,
                                                    JSMSG_DEBUGGEE_WOULD_RUN,
                                                    script->filename(), linenoStr);
                                                    filename, linenoStr);
            }
        }
        return true;