Bug 650161 - Update pointers to relocated objects r=terrence

This commit is contained in:
Jon Coppeard
2012-06-05 11:47:42 -07:00
parent 5b604fe414
commit 0df96e785c
28 changed files with 489 additions and 69 deletions

View File

@@ -2834,7 +2834,7 @@ ProxyObject::trace(JSTracer *trc, JSObject *obj)
#ifdef DEBUG
if (trc->runtime()->gc.isStrictProxyCheckingEnabled() && proxy->is<WrapperObject>()) {
JSObject *referent = &proxy->private_().toObject();
JSObject *referent = MaybeForwarded(&proxy->private_().toObject());
if (referent->compartment() != proxy->compartment()) {
/*
* Assert that this proxy is tracked in the wrapper map. We maintain
@@ -2842,6 +2842,7 @@ ProxyObject::trace(JSTracer *trc, JSObject *obj)
*/
Value key = ObjectValue(*referent);
WrapperMap::Ptr p = proxy->compartment()->lookupWrapper(key);
JS_ASSERT(p);
JS_ASSERT(*p->value().unsafeGet() == ObjectValue(*proxy));
}
}