Bug 776583 - Make post barrier verifier pass interpreter tests; r=billm
This commit is contained in:
@@ -91,7 +91,7 @@ WeakMapBase::restoreWeakMapList(JSRuntime *rt, WeakMapVector &vector)
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
typedef WeakMap<HeapPtrObject, HeapValue> ObjectValueMap;
|
||||
typedef WeakMap<EncapsulatedPtrObject, RelocatableValue> ObjectValueMap;
|
||||
|
||||
static ObjectValueMap *
|
||||
GetObjectMap(JSObject *obj)
|
||||
@@ -262,6 +262,7 @@ WeakMap_set_impl(JSContext *cx, CallArgs args)
|
||||
JS_ReportOutOfMemory(cx);
|
||||
return false;
|
||||
}
|
||||
HashTableWriteBarrierPost(cx->compartment, map, key);
|
||||
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
@@ -286,7 +287,7 @@ JS_NondeterministicGetWeakMapKeys(JSContext *cx, JSObject *obj, JSObject **ret)
|
||||
return false;
|
||||
ObjectValueMap *map = GetObjectMap(obj);
|
||||
if (map) {
|
||||
for (ObjectValueMap::Range r = map->nondeterministicAll(); !r.empty(); r.popFront()) {
|
||||
for (ObjectValueMap::Base::Range r = map->all(); !r.empty(); r.popFront()) {
|
||||
RootedObject key(cx, r.front().key);
|
||||
// Re-wrapping the key (see comment of GetKeyArg)
|
||||
if (!JS_WrapObject(cx, key.address()))
|
||||
|
||||
Reference in New Issue
Block a user