Commit 2393f6c2 authored by timeless%mozdev.org's avatar timeless%mozdev.org
Browse files

Bug 296512 Change DOMGCCallback to *always* chain to other callbacks

r=jst sr=brendan a=asa
parent 48e369ae
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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