Bug 796760 (part 1) - Exactly root JSTraceOp. r=terrence.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 02 Oct 2012 22:02:44 -0700
changeset 109117 8694a4aa91cf9596736f3c263f0f4e5a22c430d4
parent 109116 eb6641924764365f079427c8213ea783e1a702a6
child 109118 d552f2d2337fe8f42757f58fcd03fa468dc33c6f
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersterrence
bugs796760
milestone18.0a1
Bug 796760 (part 1) - Exactly root JSTraceOp. r=terrence.
js/src/builtin/MapObject.cpp
js/src/builtin/MapObject.h
js/src/builtin/ParallelArray.cpp
js/src/builtin/ParallelArray.h
js/src/jsapi.cpp
js/src/jsapi.h
js/src/jsarray.cpp
js/src/jsexn.cpp
js/src/jsfun.cpp
js/src/jsproxy.cpp
js/src/jstypedarray.cpp
js/src/jstypedarray.h
js/src/jsweakmap.cpp
js/src/jsxml.cpp
js/src/vm/ArgumentsObject.cpp
js/src/vm/ArgumentsObject.h
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
js/src/vm/RegExpObject.cpp
js/src/vm/RegExpStatics.cpp
--- a/js/src/builtin/MapObject.cpp
+++ b/js/src/builtin/MapObject.cpp
@@ -957,17 +957,17 @@ MarkKey(Range &r, const HashableValue &k
 
             JS_ASSERT(newKey.get().isObject());
             r.rekeyFront(newKey);
         }
     }
 }
 
 void
-MapObject::mark(JSTracer *trc, JSObject *obj)
+MapObject::mark(JSTracer *trc, RawObject obj)
 {
     if (ValueMap *map = obj->asMap().getData()) {
         for (ValueMap::Range r = map->all(); !r.empty(); r.popFront()) {
             MarkKey(r, r.front().key, trc);
             gc::MarkValue(trc, &r.front().value, "value");
         }
     }
 }
@@ -1350,17 +1350,17 @@ JSFunctionSpec SetObject::methods[] = {
 JSObject *
 SetObject::initClass(JSContext *cx, JSObject *obj)
 {
     Rooted<GlobalObject*> global(cx, &obj->asGlobal());
     return InitClass(cx, global, &class_, JSProto_Set, construct, methods);
 }
 
 void
-SetObject::mark(JSTracer *trc, JSObject *obj)
+SetObject::mark(JSTracer *trc, RawObject obj)
 {
     SetObject *setobj = static_cast<SetObject *>(obj);
     if (ValueSet *set = setobj->getData()) {
         for (ValueSet::Range r = set->all(); !r.empty(); r.popFront())
             MarkKey(r, r.front(), trc);
     }
 }
 
--- a/js/src/builtin/MapObject.h
+++ b/js/src/builtin/MapObject.h
@@ -82,17 +82,17 @@ typedef OrderedHashSet<HashableValue,
 class MapObject : public JSObject {
   public:
     static JSObject *initClass(JSContext *cx, JSObject *obj);
     static Class class_;
   private:
     static JSFunctionSpec methods[];
     ValueMap *getData() { return static_cast<ValueMap *>(getPrivate()); }
     static ValueMap & extract(CallReceiver call);
-    static void mark(JSTracer *trc, JSObject *obj);
+    static void mark(JSTracer *trc, RawObject obj);
     static void finalize(FreeOp *fop, JSObject *obj);
     static JSBool construct(JSContext *cx, unsigned argc, Value *vp);
 
     static bool is(const Value &v);
 
     static bool size_impl(JSContext *cx, CallArgs args);
     static JSBool size(JSContext *cx, unsigned argc, Value *vp);
     static bool get_impl(JSContext *cx, CallArgs args);
@@ -110,17 +110,17 @@ class MapObject : public JSObject {
 class SetObject : public JSObject {
   public:
     static JSObject *initClass(JSContext *cx, JSObject *obj);
     static Class class_;
   private:
     static JSFunctionSpec methods[];
     ValueSet *getData() { return static_cast<ValueSet *>(getPrivate()); }
     static ValueSet & extract(CallReceiver call);
-    static void mark(JSTracer *trc, JSObject *obj);
+    static void mark(JSTracer *trc, RawObject obj);
     static void finalize(FreeOp *fop, JSObject *obj);
     static JSBool construct(JSContext *cx, unsigned argc, Value *vp);
 
     static bool is(const Value &v);
 
     static bool size_impl(JSContext *cx, CallArgs args);
     static JSBool size(JSContext *cx, unsigned argc, Value *vp);
     static bool has_impl(JSContext *cx, CallArgs args);
--- a/js/src/builtin/ParallelArray.cpp
+++ b/js/src/builtin/ParallelArray.cpp
@@ -1706,17 +1706,17 @@ ParallelArrayObject::toLocaleString(JSCo
         args.rval().setString(str);
         return true;
     }
 
     return false;
 }
 
 void
-ParallelArrayObject::mark(JSTracer *trc, JSObject *obj)
+ParallelArrayObject::mark(JSTracer *trc, RawObject obj)
 {
     gc::MarkSlot(trc, &obj->getSlotRef(SLOT_DIMENSIONS), "parallelarray.shape");
     gc::MarkSlot(trc, &obj->getSlotRef(SLOT_BUFFER), "parallelarray.buffer");
 }
 
 JSBool
 ParallelArrayObject::lookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
                                    MutableHandleObject objp, MutableHandleShape propp)
--- a/js/src/builtin/ParallelArray.h
+++ b/js/src/builtin/ParallelArray.h
@@ -341,17 +341,17 @@ class ParallelArrayObject : public JSObj
     static bool partition(JSContext *cx, CallArgs args);
     static bool get(JSContext *cx, CallArgs args);
     static bool dimensionsGetter(JSContext *cx, CallArgs args);
     static bool lengthGetter(JSContext *cx, CallArgs args);
     static bool toString(JSContext *cx, CallArgs args);
     static bool toLocaleString(JSContext *cx, CallArgs args);
     static bool toSource(JSContext *cx, CallArgs args);
 
-    static void mark(JSTracer *trc, JSObject *obj);
+    static void mark(JSTracer *trc, RawObject obj);
     static JSBool lookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
                                 MutableHandleObject objp, MutableHandleShape propp);
     static JSBool lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
                                  MutableHandleObject objp, MutableHandleShape propp);
     static JSBool lookupElement(JSContext *cx, HandleObject obj, uint32_t index,
                                 MutableHandleObject objp, MutableHandleShape propp);
     static JSBool lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid,
                                 MutableHandleObject objp, MutableHandleShape propp);
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -4549,17 +4549,17 @@ prop_iter_finalize(FreeOp *fop, JSObject
     if (obj->getSlot(JSSLOT_ITER_INDEX).toInt32() >= 0) {
         /* Non-native case: destroy the ida enumerated when obj was created. */
         JSIdArray *ida = (JSIdArray *) pdata;
         DestroyIdArray(fop, ida);
     }
 }
 
 static void
-prop_iter_trace(JSTracer *trc, JSObject *obj)
+prop_iter_trace(JSTracer *trc, RawObject obj)
 {
     void *pdata = obj->getPrivate();
     if (!pdata)
         return;
 
     if (obj->getSlot(JSSLOT_ITER_INDEX).toInt32() < 0) {
         /*
          * Native case: just mark the next property to visit. We don't need a
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -1833,17 +1833,17 @@ typedef JSBool
  * state. It must not change state of the object or corresponding native
  * structures. The only exception for this rule is the case when the embedding
  * needs a tight integration with GC. In that case the embedding can check if
  * the traversal is a part of the marking phase through calling
  * JS_IsGCMarkingTracer and apply a special code like emptying caches or
  * marking its native structures.
  */
 typedef void
-(* JSTraceOp)(JSTracer *trc, JSObject *obj);
+(* JSTraceOp)(JSTracer *trc, JSRawObject obj);
 
 /*
  * DEBUG only callback that JSTraceOp implementation can provide to return
  * a string describing the reference traced with JS_CallTracer.
  */
 typedef void
 (* JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize);
 
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -1122,17 +1122,17 @@ array_deleteSpecial(JSContext *cx, Handl
     if (!obj->isDenseArray())
         return baseops::DeleteSpecial(cx, obj, sid, rval, strict);
 
     rval.setBoolean(true);
     return true;
 }
 
 static void
-array_trace(JSTracer *trc, JSObject *obj)
+array_trace(JSTracer *trc, RawObject obj)
 {
     JS_ASSERT(obj->isDenseArray());
 
     uint32_t initLength = obj->getDenseArrayInitializedLength();
     MarkArraySlots(trc, initLength, obj->getDenseArrayElements(), "element");
 }
 
 Class js::ArrayClass = {
--- a/js/src/jsexn.cpp
+++ b/js/src/jsexn.cpp
@@ -45,17 +45,17 @@ using namespace js;
 using namespace js::gc;
 using namespace js::types;
 
 /* Forward declarations for ErrorClass's initializer. */
 static JSBool
 Exception(JSContext *cx, unsigned argc, Value *vp);
 
 static void
-exn_trace(JSTracer *trc, JSObject *obj);
+exn_trace(JSTracer *trc, RawObject obj);
 
 static void
 exn_finalize(FreeOp *fop, JSObject *obj);
 
 static JSBool
 exn_resolve(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
             MutableHandleObject objp);
 
@@ -343,17 +343,17 @@ InitExnPrivate(JSContext *cx, HandleObje
 static inline JSExnPrivate *
 GetExnPrivate(JSObject *obj)
 {
     JS_ASSERT(obj->isError());
     return (JSExnPrivate *) obj->getPrivate();
 }
 
 static void
-exn_trace(JSTracer *trc, JSObject *obj)
+exn_trace(JSTracer *trc, RawObject obj)
 {
     if (JSExnPrivate *priv = GetExnPrivate(obj)) {
         if (priv->message)
             MarkString(trc, &priv->message, "exception message");
         if (priv->filename)
             MarkString(trc, &priv->filename, "exception filename");
 
         for (size_t i = 0; i != priv->stackDepth; ++i) {
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -519,17 +519,17 @@ JSFunction::trace(JSTracer *trc)
         if (u.i.script_)
             MarkScriptUnbarriered(trc, &u.i.script_, "script");
         if (u.i.env_)
             MarkObjectUnbarriered(trc, &u.i.env_, "fun_callscope");
     }
 }
 
 static void
-fun_trace(JSTracer *trc, JSObject *obj)
+fun_trace(JSTracer *trc, RawObject obj)
 {
     obj->toFunction()->trace(trc);
 }
 
 /*
  * Reserve two slots in all function objects for XPConnect.  Note that this
  * does not bloat every instance, only those on which reserved slots are set,
  * and those on which ad-hoc properties are defined.
--- a/js/src/jsproxy.cpp
+++ b/js/src/jsproxy.cpp
@@ -2813,17 +2813,17 @@ static JSBool
 proxy_DeleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid,
                     MutableHandleValue rval, JSBool strict)
 {
     Rooted<jsid> id(cx, SPECIALID_TO_JSID(sid));
     return proxy_DeleteGeneric(cx, obj, id, rval, strict);
 }
 
 static void
-proxy_TraceObject(JSTracer *trc, JSObject *obj)
+proxy_TraceObject(JSTracer *trc, RawObject obj)
 {
 #ifdef DEBUG
     if (!trc->runtime->gcDisableStrictProxyCheckingCount && obj->isWrapper()) {
         JSObject *referent = &GetProxyPrivate(obj).toObject();
         if (referent->compartment() != obj->compartment()) {
             /*
              * Assert that this proxy is tracked in the wrapper map. We maintain
              * the invariant that the wrapped object is the key in the wrapper map.
@@ -2838,17 +2838,17 @@ proxy_TraceObject(JSTracer *trc, JSObjec
     // NB: If you add new slots here, make sure to change
     // js::NukeChromeCrossCompartmentWrappers to cope.
     MarkCrossCompartmentSlot(trc, &obj->getReservedSlotRef(JSSLOT_PROXY_PRIVATE), "private");
     MarkSlot(trc, &obj->getReservedSlotRef(JSSLOT_PROXY_EXTRA + 0), "extra0");
     MarkSlot(trc, &obj->getReservedSlotRef(JSSLOT_PROXY_EXTRA + 1), "extra1");
 }
 
 static void
-proxy_TraceFunction(JSTracer *trc, JSObject *obj)
+proxy_TraceFunction(JSTracer *trc, RawObject obj)
 {
     // NB: If you add new slots here, make sure to change
     // js::NukeChromeCrossCompartmentWrappers to cope.
     MarkCrossCompartmentSlot(trc, &GetCall(obj), "call");
     MarkSlot(trc, &GetFunctionProxyConstruct(obj), "construct");
     proxy_TraceObject(trc, obj);
 }
 
--- a/js/src/jstypedarray.cpp
+++ b/js/src/jstypedarray.cpp
@@ -489,17 +489,17 @@ ArrayBufferObject::stealContents(JSConte
     *GetViewList(&buffer) = views;
     for (JSObject *view = views; view; view = NextView(view))
         TypedArray::neuter(view);
 
     return true;
 }
 
 void
-ArrayBufferObject::obj_trace(JSTracer *trc, JSObject *obj)
+ArrayBufferObject::obj_trace(JSTracer *trc, RawObject obj)
 {
     /*
      * If this object changes, it will get marked via the private data barrier,
      * so it's safe to leave it Unbarriered.
      */
     JSObject *delegate = static_cast<JSObject*>(obj->getPrivate());
     if (delegate) {
         JS_SET_TRACING_LOCATION(trc, &obj->privateRef(obj->numFixedSlots()));
@@ -1145,17 +1145,17 @@ class TypedArrayTemplate
         return &TypedArray::classes[ArrayTypeID()];
     }
 
     static bool is(const Value &v) {
         return v.isObject() && v.toObject().hasClass(fastClass());
     }
 
     static void
-    obj_trace(JSTracer *trc, JSObject *obj)
+    obj_trace(JSTracer *trc, RawObject obj)
     {
         MarkSlot(trc, &obj->getFixedSlotRef(BUFFER_SLOT), "typedarray.buffer");
     }
 
     static JSBool
     obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name,
                     MutableHandleValue vp)
     {
--- a/js/src/jstypedarray.h
+++ b/js/src/jstypedarray.h
@@ -49,17 +49,17 @@ class ArrayBufferObject : public JSObjec
     static JSBool createDataViewForThis(JSContext *cx, unsigned argc, Value *vp);
 
     template<typename T>
     static bool createTypedArrayFromBufferImpl(JSContext *cx, CallArgs args);
 
     template<typename T>
     static JSBool createTypedArrayFromBuffer(JSContext *cx, unsigned argc, Value *vp);
 
-    static void obj_trace(JSTracer *trc, JSObject *obj);
+    static void obj_trace(JSTracer *trc, RawObject obj);
 
     static JSBool obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
                                     MutableHandleObject objp, MutableHandleShape propp);
     static JSBool obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
                                      MutableHandleObject objp, MutableHandleShape propp);
     static JSBool obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index,
                                     MutableHandleObject objp, MutableHandleShape propp);
     static JSBool obj_lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid,
--- a/js/src/jsweakmap.cpp
+++ b/js/src/jsweakmap.cpp
@@ -297,17 +297,17 @@ JS_NondeterministicGetWeakMapKeys(JSCont
                 return false;
         }
     }
     *ret = arr;
     return true;
 }
 
 static void
-WeakMap_mark(JSTracer *trc, JSObject *obj)
+WeakMap_mark(JSTracer *trc, RawObject obj)
 {
     if (ObjectValueMap *map = GetObjectMap(obj))
         map->trace(trc);
 }
 
 static void
 WeakMap_finalize(FreeOp *fop, JSObject *obj)
 {
--- a/js/src/jsxml.cpp
+++ b/js/src/jsxml.cpp
@@ -5119,17 +5119,17 @@ xml_typeOf(JSContext *cx, HandleObject o
 
 static JSBool
 xml_hasInstance(JSContext *cx, HandleObject obj, MutableHandleValue v, JSBool *bp)
 {
     return JS_TRUE;
 }
 
 static void
-xml_trace(JSTracer *trc, JSObject *obj)
+xml_trace(JSTracer *trc, RawObject obj)
 {
     JSXML *xml = (JSXML *) obj->getPrivate();
     /*
      * This is safe to leave Unbarriered for incremental GC, but we'll need
      * to fix somehow for generational.
      */
     if (xml) {
         MarkXMLUnbarriered(trc, &xml, "private");
@@ -7819,17 +7819,17 @@ struct JSXMLFilter
 
     JSXMLFilter(JSXML *list, JSXMLArray<JSXML> *array)
       : list(list), result(NULL), kid(NULL), cursor(array) {}
 
     ~JSXMLFilter() {}
 };
 
 static void
-xmlfilter_trace(JSTracer *trc, JSObject *obj)
+xmlfilter_trace(JSTracer *trc, RawObject obj)
 {
     JSXMLFilter *filter = (JSXMLFilter *) obj->getPrivate();
     if (!filter)
         return;
 
     JS_ASSERT(filter->list);
     MarkXML(trc, &filter->list, "list");
     if (filter->result)
--- a/js/src/vm/ArgumentsObject.cpp
+++ b/js/src/vm/ArgumentsObject.cpp
@@ -395,17 +395,17 @@ strictargs_enumerate(JSContext *cx, Hand
 
 void
 ArgumentsObject::finalize(FreeOp *fop, JSObject *obj)
 {
     fop->free_(reinterpret_cast<void *>(obj->asArguments().data()));
 }
 
 void
-ArgumentsObject::trace(JSTracer *trc, JSObject *obj)
+ArgumentsObject::trace(JSTracer *trc, RawObject obj)
 {
     ArgumentsObject &argsobj = obj->asArguments();
     ArgumentsData *data = argsobj.data();
     MarkValue(trc, &data->callee, js_callee_str);
     MarkValueRange(trc, data->numArgs, data->args, js_arguments_str);
     MarkScriptUnbarriered(trc, &data->script, "script");
 }
 
--- a/js/src/vm/ArgumentsObject.h
+++ b/js/src/vm/ArgumentsObject.h
@@ -186,17 +186,17 @@ class ArgumentsObject : public JSObject
 
     /*
      * Measures things hanging off this ArgumentsObject that are counted by the
      * |miscSize| argument in JSObject::sizeOfExcludingThis().
      */
     inline size_t sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const;
 
     static void finalize(FreeOp *fop, JSObject *obj);
-    static void trace(JSTracer *trc, JSObject *obj);
+    static void trace(JSTracer *trc, RawObject obj);
 
     /* For jit use: */
     static size_t getDataSlotOffset() {
         return getFixedSlotOffset(DATA_SLOT);
     }
 };
 
 class NormalArgumentsObject : public ArgumentsObject
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -1395,17 +1395,17 @@ Debugger::markAllIteratively(GCMarker *t
                 }
             }
         }
     }
     return markedAny;
 }
 
 void
-Debugger::traceObject(JSTracer *trc, JSObject *obj)
+Debugger::traceObject(JSTracer *trc, RawObject obj)
 {
     if (Debugger *dbg = Debugger::fromJSObject(obj))
         dbg->trace(trc);
 }
 
 void
 Debugger::trace(JSTracer *trc)
 {
@@ -2370,17 +2370,17 @@ GetScriptReferent(JSObject *obj)
 static inline void
 SetScriptReferent(JSObject *obj, JSScript *script)
 {
     JS_ASSERT(obj->getClass() == &DebuggerScript_class);
     obj->setPrivateGCThing(script);
 }
 
 static void
-DebuggerScript_trace(JSTracer *trc, JSObject *obj)
+DebuggerScript_trace(JSTracer *trc, RawObject obj)
 {
     /* This comes from a private pointer, so no barrier needed. */
     if (JSScript *script = GetScriptReferent(obj)) {
         MarkCrossCompartmentScriptUnbarriered(trc, &script, "Debugger.Script referent");
         obj->setPrivateUnbarriered(script);
     }
 }
 
@@ -3559,17 +3559,17 @@ static JSFunctionSpec DebuggerFrame_meth
     JS_FN("evalWithBindings", DebuggerFrame_evalWithBindings, 1, 0),
     JS_FS_END
 };
 
 
 /*** Debugger.Object *****************************************************************************/
 
 static void
-DebuggerObject_trace(JSTracer *trc, JSObject *obj)
+DebuggerObject_trace(JSTracer *trc, RawObject obj)
 {
     /*
      * There is a barrier on private pointers, so the Unbarriered marking
      * is okay.
      */
     if (JSObject *referent = (JSObject *) obj->getPrivate()) {
         MarkCrossCompartmentObjectUnbarriered(trc, &referent, "Debugger.Object referent");
         obj->setPrivateUnbarriered(referent);
@@ -4279,17 +4279,17 @@ static JSFunctionSpec DebuggerObject_met
     JS_FN("evalInGlobalWithBindings", DebuggerObject_evalInGlobalWithBindings, 2, 0),
     JS_FS_END
 };
 
 
 /*** Debugger.Environment ************************************************************************/
 
 static void
-DebuggerEnv_trace(JSTracer *trc, JSObject *obj)
+DebuggerEnv_trace(JSTracer *trc, RawObject obj)
 {
     /*
      * There is a barrier on private pointers, so the Unbarriered marking
      * is okay.
      */
     if (Env *referent = (JSObject *) obj->getPrivate()) {
         MarkCrossCompartmentObjectUnbarriered(trc, &referent, "Debugger.Environment referent");
         obj->setPrivateUnbarriered(referent);
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -136,17 +136,17 @@ class Debugger {
      *     anything else - Make a new TypeError the pending exception and
      *         return handleUncaughtException(ac, vp, callHook).
      */
     JSTrapStatus parseResumptionValue(Maybe<AutoCompartment> &ac, bool ok, const Value &rv,
                                       Value *vp, bool callHook = true);
 
     JSObject *unwrapDebuggeeArgument(JSContext *cx, const Value &v);
 
-    static void traceObject(JSTracer *trc, JSObject *obj);
+    static void traceObject(JSTracer *trc, RawObject obj);
     void trace(JSTracer *trc);
     static void finalize(FreeOp *fop, JSObject *obj);
     void markKeysInCompartment(JSTracer *tracer);
 
     static Class jsclass;
 
     static Debugger *fromThisValue(JSContext *cx, const CallArgs &ca, const char *fnname);
     static JSBool getEnabled(JSContext *cx, unsigned argc, Value *vp);
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -234,17 +234,17 @@ RegExpCode::execute(JSContext *cx, const
 
     JS_ASSERT(result >= 0);
     return RegExpRunStatus_Success;
 }
 
 /* RegExpObject */
 
 static void
-regexp_trace(JSTracer *trc, JSObject *obj)
+regexp_trace(JSTracer *trc, RawObject obj)
 {
      /*
       * We have to check both conditions, since:
       *   1. During TraceRuntime, isHeapBusy() is true
       *   2. When a write barrier executes, IS_GC_MARKING_TRACER is true.
       */
     if (trc->runtime->isHeapBusy() && IS_GC_MARKING_TRACER(trc))
         obj->setPrivate(NULL);
--- a/js/src/vm/RegExpStatics.cpp
+++ b/js/src/vm/RegExpStatics.cpp
@@ -23,17 +23,17 @@ using namespace js;
 static void
 resc_finalize(FreeOp *fop, JSObject *obj)
 {
     RegExpStatics *res = static_cast<RegExpStatics *>(obj->getPrivate());
     fop->delete_(res);
 }
 
 static void
-resc_trace(JSTracer *trc, JSObject *obj)
+resc_trace(JSTracer *trc, RawObject obj)
 {
     void *pdata = obj->getPrivate();
     JS_ASSERT(pdata);
     RegExpStatics *res = static_cast<RegExpStatics *>(pdata);
     res->mark(trc);
 }
 
 Class js::RegExpStaticsClass = {