mark-jsprivate
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 95 b35cbfa6ad4f8bac97b5a0ae2a3bfc18ed88de35
permissions -rw-r--r--
State as of now

diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -4941,6 +4941,15 @@ js_TraceObject(JSTracer *trc, JSObject *
             (void) clasp->mark(cx, obj, trc);
     }
 
+    /* Conservatively mark the class-private */
+    if (clasp->flags && JSCLASS_HAS_PRIVATE) {
+        JSGC *gc = cx->runtime->gc;
+        gc->MMgc::GC::PushWorkItem(
+            MMgc::GCWorkItem(&obj->fslots[JSSLOT_PRIVATE],
+                             sizeof(jsval),
+                             false));
+    }
+
     /*
      * An unmutated object that shares a prototype object's scope. We can't
      * tell how many slots are in use in obj by looking at its scope, so we