diff options
author | Sean Joseph <sean.joseph@cengage.com> | 2020-11-26 18:40:41 -0500 |
---|---|---|
committer | Sean Joseph <sean.joseph@cengage.com> | 2020-11-26 18:40:41 -0500 |
commit | 9e22804983ab7506f35929e88e59741b7dfb7973 (patch) | |
tree | 25d0844211ed74a28d885e6194c6d437acf18789 /components/script/init.rs | |
parent | 823cca30d65f58eaa80085ff2e40e99ba7bcb8ba (diff) | |
download | servo-9e22804983ab7506f35929e88e59741b7dfb7973.tar.gz servo-9e22804983ab7506f35929e88e59741b7dfb7973.zip |
Added is_platform_object_static check to is_dom_object
Diffstat (limited to 'components/script/init.rs')
-rw-r--r-- | components/script/init.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/init.rs b/components/script/init.rs index 53d91fbdc66..8fd59592f01 100644 --- a/components/script/init.rs +++ b/components/script/init.rs @@ -5,6 +5,7 @@ use crate::dom::bindings::codegen::RegisterBindings; use crate::dom::bindings::conversions::is_dom_proxy; use crate::dom::bindings::proxyhandler; +use crate::dom::bindings::utils::is_platform_object_static; use crate::script_runtime::JSEngineSetup; use js::jsapi::JSObject; @@ -53,7 +54,7 @@ fn perform_platform_specific_initialization() {} #[allow(unsafe_code)] unsafe extern "C" fn is_dom_object(obj: *mut JSObject) -> bool { - !obj.is_null() && is_dom_proxy(obj) + !obj.is_null() && (is_platform_object_static(obj) || is_dom_proxy(obj)) } #[allow(unsafe_code)] |