mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 796320 (part 3) - Remove JSContext::lastMessage. r=luke.
--HG-- extra : rebase_source : efda9e940e598fc037d6d51403b95c01ba3bad4b
This commit is contained in:
parent
a0352fce84
commit
daba0ca48f
@ -998,11 +998,6 @@ js_ReportErrorAgain(JSContext *cx, const char *message, JSErrorReport *reportp)
|
||||
if (!message)
|
||||
return;
|
||||
|
||||
if (cx->lastMessage)
|
||||
js_free(cx->lastMessage);
|
||||
cx->lastMessage = JS_strdup(cx, message);
|
||||
if (!cx->lastMessage)
|
||||
return;
|
||||
onError = cx->errorReporter;
|
||||
|
||||
/*
|
||||
@ -1011,11 +1006,11 @@ js_ReportErrorAgain(JSContext *cx, const char *message, JSErrorReport *reportp)
|
||||
*/
|
||||
if (onError) {
|
||||
JSDebugErrorHook hook = cx->runtime->debugHooks.debugErrorHook;
|
||||
if (hook && !hook(cx, cx->lastMessage, reportp, cx->runtime->debugHooks.debugErrorHookData))
|
||||
if (hook && !hook(cx, message, reportp, cx->runtime->debugHooks.debugErrorHookData))
|
||||
onError = NULL;
|
||||
}
|
||||
if (onError)
|
||||
onError(cx, cx->lastMessage, reportp);
|
||||
onError(cx, message, reportp);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1213,7 +1208,6 @@ JSContext::JSContext(JSRuntime *rt)
|
||||
stack(thisDuringConstruction()),
|
||||
parseMapPool_(NULL),
|
||||
cycleDetectorSet(thisDuringConstruction()),
|
||||
lastMessage(NULL),
|
||||
errorReporter(NULL),
|
||||
operationCallback(NULL),
|
||||
data(NULL),
|
||||
@ -1252,9 +1246,6 @@ JSContext::~JSContext()
|
||||
if (parseMapPool_)
|
||||
js_delete(parseMapPool_);
|
||||
|
||||
if (lastMessage)
|
||||
js_free(lastMessage);
|
||||
|
||||
JS_ASSERT(!resolvingList);
|
||||
}
|
||||
|
||||
|
@ -1355,9 +1355,6 @@ struct JSContext : js::ContextFriendFields
|
||||
/* State for object and array toSource conversion. */
|
||||
js::ObjectSet cycleDetectorSet;
|
||||
|
||||
/* Last message string and log file for debugging. */
|
||||
char *lastMessage;
|
||||
|
||||
/* Per-context optional error reporter. */
|
||||
JSErrorReporter errorReporter;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user