Implement safe rooting strategy via Unrooted, Root, JSRef, and JS.

This commit is contained in:
Josh Matthews 2014-03-31 18:41:28 -04:00
parent ffdc3f5b32
commit d7b96db33c
109 changed files with 1568 additions and 1326 deletions

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::BindingDeclarations::ConsoleBinding;
use dom::bindings::js::{JS, JSRef};
use dom::bindings::js::{JSRef, Unrooted};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::window::Window;
use servo_util::str::DOMString;
@ -20,7 +20,7 @@ impl Console {
}
}
pub fn new(window: &JSRef<Window>) -> JS<Console> {
pub fn new(window: &JSRef<Window>) -> Unrooted<Console> {
reflect_dom_object(~Console::new_inherited(), window, ConsoleBinding::Wrap)
}