diff options
author | Eduard Burtescu <edy.burt@gmail.com> | 2016-07-04 20:59:01 +0300 |
---|---|---|
committer | Eduard Burtescu <edy.burt@gmail.com> | 2016-07-04 20:59:01 +0300 |
commit | 0db1faf87651c99223683faafc836353f016ffb3 (patch) | |
tree | dec7ee5366fdb60a47f495d32c11a9ed2b8a4eb2 /components/script/script_thread.rs | |
parent | a77cc9950fb13ccd674a10e46c2327bfa0735dab (diff) | |
download | servo-0db1faf87651c99223683faafc836353f016ffb3.tar.gz servo-0db1faf87651c99223683faafc836353f016ffb3.zip |
Switch to using the new rooted!/RootedGuard API for rooting.
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 96555524c5d..7a23867fc8b 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -58,7 +58,7 @@ use hyper::mime::{Mime, SubLevel, TopLevel}; use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::router::ROUTER; use js::glue::GetWindowProxyClass; -use js::jsapi::{DOMProxyShadowsResult, HandleId, HandleObject, RootedValue}; +use js::jsapi::{DOMProxyShadowsResult, HandleId, HandleObject}; use js::jsapi::{JSAutoCompartment, JSContext, JS_SetWrapObjectCallbacks}; use js::jsapi::{JSTracer, SetWindowProxyClass}; use js::jsval::UndefinedValue; @@ -1747,7 +1747,7 @@ impl ScriptThread { // Script source is ready to be evaluated (11.) unsafe { let _ac = JSAutoCompartment::new(self.get_cx(), window.reflector().get_jsobject().get()); - let mut jsval = RootedValue::new(self.get_cx(), UndefinedValue()); + rooted!(in(self.get_cx()) let mut jsval = UndefinedValue()); window.evaluate_js_on_global_with_result(&script_source, jsval.handle_mut()); let strval = DOMString::from_jsval(self.get_cx(), jsval.handle(), |