зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 26933ef9fa13 (bug 1506323) for landing the wrong patch.
--HG-- extra : rebase_source : ba856955dcf81339ec94abf140810c3b4dadc73b
This commit is contained in:
Родитель
9e968bb929
Коммит
1f1188e86c
|
@ -4301,16 +4301,6 @@ CreateError(JSContext* cx, JSExnType type, HandleObject stack,
|
|||
HandleString fileName, uint32_t lineNumber, uint32_t columnNumber,
|
||||
JSErrorReport* report, HandleString message, MutableHandleValue rval);
|
||||
|
||||
/*
|
||||
* Prints a full report and returns true if the given report is non-nullptr
|
||||
* and the report doesn't have the JSREPORT_WARNING flag set or reportWarnings
|
||||
* is true.
|
||||
* Returns false otherwise.
|
||||
*/
|
||||
extern JS_PUBLIC_API(bool)
|
||||
PrintError(JSContext* cx, FILE* file, ConstUTF8CharsZ toStringResult,
|
||||
JSErrorReport* report, bool reportWarnings);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
|
|
|
@ -9475,7 +9475,7 @@ js::shell::AutoReportException::~AutoReportException()
|
|||
MOZ_ASSERT(!JSREPORT_IS_WARNING(report.report()->flags));
|
||||
|
||||
FILE* fp = ErrorFilePointer();
|
||||
JS::PrintError(cx, fp, report.toStringResult(), report.report(), reportWarnings);
|
||||
PrintError(cx, fp, report.toStringResult(), report.report(), reportWarnings);
|
||||
|
||||
{
|
||||
JS::AutoSaveExceptionState savedExc(cx);
|
||||
|
@ -9521,7 +9521,7 @@ js::shell::WarningReporter(JSContext* cx, JSErrorReport* report)
|
|||
}
|
||||
|
||||
// Print the warning.
|
||||
JS::PrintError(cx, fp, JS::ConstUTF8CharsZ(), report, reportWarnings);
|
||||
PrintError(cx, fp, JS::ConstUTF8CharsZ(), report, reportWarnings);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
@ -578,8 +578,8 @@ PrintSingleError(JSContext* cx, FILE* file, JS::ConstUTF8CharsZ toStringResult,
|
|||
return true;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(bool)
|
||||
JS::PrintError(JSContext* cx, FILE* file, JS::ConstUTF8CharsZ toStringResult,
|
||||
bool
|
||||
js::PrintError(JSContext* cx, FILE* file, JS::ConstUTF8CharsZ toStringResult,
|
||||
JSErrorReport* report, bool reportWarnings)
|
||||
{
|
||||
MOZ_ASSERT(report);
|
||||
|
|
|
@ -1071,6 +1071,16 @@ ExpandErrorArgumentsVA(JSContext* cx, JSErrorCallback callback,
|
|||
extern void
|
||||
ReportUsageErrorASCII(JSContext* cx, HandleObject callee, const char* msg);
|
||||
|
||||
/*
|
||||
* Prints a full report and returns true if the given report is non-nullptr
|
||||
* and the report doesn't have the JSREPORT_WARNING flag set or reportWarnings
|
||||
* is true.
|
||||
* Returns false otherwise.
|
||||
*/
|
||||
extern bool
|
||||
PrintError(JSContext* cx, FILE* file, JS::ConstUTF8CharsZ toStringResult,
|
||||
JSErrorReport* report, bool reportWarnings);
|
||||
|
||||
extern void
|
||||
ReportIsNotDefined(JSContext* cx, HandlePropertyName name);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ selfHosting_WarningReporter(JSContext* cx, JSErrorReport* report)
|
|||
MOZ_ASSERT(report);
|
||||
MOZ_ASSERT(JSREPORT_IS_WARNING(report->flags));
|
||||
|
||||
JS::PrintError(cx, stderr, JS::ConstUTF8CharsZ(), report, true);
|
||||
PrintError(cx, stderr, JS::ConstUTF8CharsZ(), report, true);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -2894,7 +2894,7 @@ MaybePrintAndClearPendingException(JSContext* cx, FILE* file)
|
|||
}
|
||||
|
||||
MOZ_ASSERT(!JSREPORT_IS_WARNING(report.report()->flags));
|
||||
JS::PrintError(cx, file, report.toStringResult(), report.report(), true);
|
||||
PrintError(cx, file, report.toStringResult(), report.report(), true);
|
||||
}
|
||||
|
||||
class MOZ_STACK_CLASS AutoSelfHostingErrorReporter
|
||||
|
|
Загрузка…
Ссылка в новой задаче