diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-01-25 21:19:00 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-01-25 21:42:07 +0100 |
commit | 5f5381e4c18da10cfb39f4c793b306be6192cc0e (patch) | |
tree | cd9d7da5d3d22f8896b0c6ed69222c3003a2e4fa /components/script/dom/bindings/proxyhandler.rs | |
parent | ff8cbff81016c157373c1675f3eee69dd70ae544 (diff) | |
download | servo-5f5381e4c18da10cfb39f4c793b306be6192cc0e.tar.gz servo-5f5381e4c18da10cfb39f4c793b306be6192cc0e.zip |
Don't create an expando holder to delete an expando.
If there is no expando object, there will be no expando to delete.
Diffstat (limited to 'components/script/dom/bindings/proxyhandler.rs')
-rw-r--r-- | components/script/dom/bindings/proxyhandler.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/bindings/proxyhandler.rs b/components/script/dom/bindings/proxyhandler.rs index 20bf723513f..49dbbf867d7 100644 --- a/components/script/dom/bindings/proxyhandler.rs +++ b/components/script/dom/bindings/proxyhandler.rs @@ -73,9 +73,10 @@ pub unsafe extern fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, i pub unsafe extern fn delete_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid, bp: *mut bool) -> bool { - let expando = EnsureExpandoObject(cx, proxy); + let expando = GetExpandoObject(proxy); if expando.is_null() { - return false; + *bp = true; + return true; } return delete_property_by_id(cx, expando, id, &mut *bp); |