mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 938131 - Simplify dom::ErrorResult::ReportJSExceptionFromJSImplementation. r=bz.
--HG-- extra : rebase_source : db7b8edd1aec3aff7240b1323c00546d2e332112
This commit is contained in:
parent
13a5c31806
commit
942e6b4680
@ -214,16 +214,7 @@ ErrorResult::ReportJSExceptionFromJSImplementation(JSContext* aCx)
|
|||||||
nsString message;
|
nsString message;
|
||||||
domError->GetMessage(message);
|
domError->GetMessage(message);
|
||||||
|
|
||||||
JSErrorReport errorReport;
|
JS_ReportError(aCx, "%hs", message.get());
|
||||||
memset(&errorReport, 0, sizeof(JSErrorReport));
|
|
||||||
errorReport.errorNumber = JSMSG_USER_DEFINED_ERROR;
|
|
||||||
errorReport.ucmessage = message.get();
|
|
||||||
errorReport.exnType = JSEXN_ERR;
|
|
||||||
JS::Rooted<JSScript*> script(aCx);
|
|
||||||
if (JS_DescribeScriptedCaller(aCx, &script, &errorReport.lineno)) {
|
|
||||||
errorReport.filename = JS_GetScriptFilename(aCx, script);
|
|
||||||
}
|
|
||||||
JS_ThrowReportedError(aCx, nullptr, &errorReport);
|
|
||||||
JS_RemoveValueRoot(aCx, &mJSException);
|
JS_RemoveValueRoot(aCx, &mJSException);
|
||||||
|
|
||||||
// We no longer have a useful exception but we do want to signal that an error
|
// We no longer have a useful exception but we do want to signal that an error
|
||||||
|
Loading…
Reference in New Issue
Block a user