Bug 641027 - Add snapshot-at-the-beginning write barriers for incremental GC (r=luke,bhackett)
This commit is contained in:
@@ -80,7 +80,7 @@ WeakMapBase::sweepAll(JSTracer *tracer)
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
typedef WeakMap<JSObject *, Value> ObjectValueMap;
|
||||
typedef WeakMap<HeapPtr<JSObject>, HeapValue> ObjectValueMap;
|
||||
|
||||
static ObjectValueMap *
|
||||
GetObjectMap(JSObject *obj)
|
||||
@@ -275,7 +275,7 @@ WeakMap_construct(JSContext *cx, uintN argc, Value *vp)
|
||||
if (!obj)
|
||||
return false;
|
||||
|
||||
obj->setPrivate(NULL);
|
||||
obj->initPrivate(NULL);
|
||||
|
||||
vp->setObject(*obj);
|
||||
return true;
|
||||
@@ -320,7 +320,7 @@ js_InitWeakMapClass(JSContext *cx, JSObject *obj)
|
||||
JSObject *weakMapProto = global->createBlankPrototype(cx, &WeakMapClass);
|
||||
if (!weakMapProto)
|
||||
return NULL;
|
||||
weakMapProto->setPrivate(NULL);
|
||||
weakMapProto->initPrivate(NULL);
|
||||
|
||||
JSFunction *ctor = global->createConstructor(cx, WeakMap_construct, &WeakMapClass,
|
||||
CLASS_ATOM(cx, WeakMap), 0);
|
||||
|
||||
Reference in New Issue
Block a user