Make proxy finalizers retrieve the DOM object from the right slot.

This commit is contained in:
Josh Matthews 2013-10-02 00:49:41 -04:00
parent 92f6599854
commit bc81716c30
2 changed files with 11 additions and 6 deletions

View file

@ -4027,7 +4027,7 @@ def finalizeHook(descriptor, hookName, context):
pass
else:
assert descriptor.nativeIsISupports
release = """let val = JS_GetReservedSlot(obj, 0);
release = """let val = JS_GetReservedSlot(obj, dom_object_slot(obj));
let _: @mut %s = cast::transmute(RUST_JSVAL_TO_PRIVATE(val));
debug!("%s finalize: %%p", this);
""" % (descriptor.concreteType, descriptor.concreteType)