From 2393f6c25bfc33c22184f84994fe93a1a837916d Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Tue, 7 Jun 2005 22:21:41 +0000 Subject: [PATCH] Bug 296512 Change DOMGCCallback to *always* chain to other callbacks r=jst sr=brendan a=asa --- dom/src/base/nsJSEnvironment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/src/base/nsJSEnvironment.cpp b/dom/src/base/nsJSEnvironment.cpp index 282547d3105a..79ad50eb8a78 100644 --- a/dom/src/base/nsJSEnvironment.cpp +++ b/dom/src/base/nsJSEnvironment.cpp @@ -2026,11 +2026,11 @@ nsJSContext::FireGCTimer() static JSBool JS_DLL_CALLBACK DOMGCCallback(JSContext *cx, JSGCStatus status) { + JSBool result = gOldJSGCCallback ? gOldJSGCCallback(cx, status) : JS_TRUE; + if (status == JSGC_BEGIN && PR_GetCurrentThread() != gDOMThread) return JS_FALSE; - JSBool result = gOldJSGCCallback ? gOldJSGCCallback(cx, status) : JS_TRUE; - // XPCJSRuntime::GCCallback does marking from the JSGC_MARK_END callback. // we need to call EndGCMark *after* marking is finished. // XXX This relies on our callback being registered after