diff --git a/js/src/jsapi.c b/js/src/jsapi.c index 2cf6023d34f..5b2d2044060 100644 --- a/js/src/jsapi.c +++ b/js/src/jsapi.c @@ -2470,13 +2470,6 @@ JS_SetGCCallbackRT(JSRuntime *rt, JSGCCallback cb) return oldcb; } -JS_PUBLIC_API(void) -JS_SetGCThingCallback(JSContext *cx, JSGCThingCallback cb, void *closure) -{ - cx->runtime->gcThingCallback = cb; - cx->runtime->gcThingCallbackClosure = closure; -} - JS_PUBLIC_API(JSBool) JS_IsAboutToBeFinalized(JSContext *cx, void *thing) { diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 22e3762071e..8b7f444bf6e 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -1094,9 +1094,6 @@ JS_SetGCCallbackRT(JSRuntime *rt, JSGCCallback cb); extern JS_PUBLIC_API(JSBool) JS_IsGCMarkingTracer(JSTracer *trc); -extern JS_PUBLIC_API(void) -JS_SetGCThingCallback(JSContext *cx, JSGCThingCallback cb, void *closure); - extern JS_PUBLIC_API(JSBool) JS_IsAboutToBeFinalized(JSContext *cx, void *thing); diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index b605c0ad85c..34937e45cea 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -198,8 +198,6 @@ struct JSRuntime { #endif JSGCCallback gcCallback; - JSGCThingCallback gcThingCallback; - void *gcThingCallbackClosure; uint32 gcMallocBytes; JSGCArenaInfo *gcUntracedArenaStackTop; #ifdef DEBUG diff --git a/js/src/jsgc.c b/js/src/jsgc.c index 10f63b6274a..a30e25822fe 100644 --- a/js/src/jsgc.c +++ b/js/src/jsgc.c @@ -1913,9 +1913,6 @@ JS_CallTracer(JSTracer *trc, void *thing, uint32 kind) JS_ASSERT(rt->gcMarkingTracer == trc); JS_ASSERT(rt->gcLevel > 0); - if (rt->gcThingCallback) - rt->gcThingCallback(thing, kind, rt->gcThingCallbackClosure); - /* * Optimize for string and double as their size is known and their tracing * is not recursive. @@ -1941,8 +1938,6 @@ JS_CallTracer(JSTracer *trc, void *thing, uint32 kind) goto out; *flagp |= GCF_MARK; thing = JSSTRDEP_BASE((JSString *) thing); - if (rt->gcThingCallback) - rt->gcThingCallback(thing, kind, rt->gcThingCallbackClosure); } /* NOTREACHED */ } @@ -2080,34 +2075,10 @@ gc_lock_traversal(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 num, void *thing = (void *)lhe->thing; JSTracer *trc = (JSTracer *)arg; uint32 traceKind; - JSRuntime *rt; - uint32 n; JS_ASSERT(lhe->count >= 1); traceKind = js_GetGCThingTraceKind(thing); JS_CALL_TRACER(trc, thing, traceKind, "locked object"); - - /* - * Bug 379455: we called the tracer once, but to communicate the value of - * thing's lock count to the tracer, or to gcThingCallback when the tracer - * is the GC marking phase, we need to call an extra lhe->count - 1 times. - */ - n = lhe->count - 1; - if (n != 0) { - if (IS_GC_MARKING_TRACER(trc)) { - rt = trc->context->runtime; - if (rt->gcThingCallback) { - do { - rt->gcThingCallback(thing, traceKind, - rt->gcThingCallbackClosure); - } while (--n != 0); - } - } else { - do { - JS_CALL_TRACER(trc, thing, traceKind, "locked object"); - } while (--n != 0); - } - } return JS_DHASH_NEXT; } diff --git a/js/src/jspubtd.h b/js/src/jspubtd.h index e3ab3374962..395540e96d8 100644 --- a/js/src/jspubtd.h +++ b/js/src/jspubtd.h @@ -636,10 +636,6 @@ typedef enum JSGCStatus { typedef JSBool (* JS_DLL_CALLBACK JSGCCallback)(JSContext *cx, JSGCStatus status); -typedef void -(* JS_DLL_CALLBACK JSGCThingCallback)(void *thing, uint32 traceKind, - void *closure); - /* * Generic trace operation that calls JS_CallTracer on each traceable thing * stored in data.