mirror of
https://github.com/servo/servo.git
synced 2025-10-10 13:30:20 +01:00
Implement safe rooting strategy via Unrooted, Root, JSRef, and JS.
This commit is contained in:
parent
ffdc3f5b32
commit
d7b96db33c
109 changed files with 1568 additions and 1326 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::BindingDeclarations::LocationBinding;
|
||||
use dom::bindings::js::{JS, JSRef};
|
||||
use dom::bindings::js::{JSRef, Unrooted};
|
||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::window::Window;
|
||||
|
@ -29,7 +29,7 @@ impl Location {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(window: &JSRef<Window>, page: Rc<Page>) -> JS<Location> {
|
||||
pub fn new(window: &JSRef<Window>, page: Rc<Page>) -> Unrooted<Location> {
|
||||
reflect_dom_object(~Location::new_inherited(page),
|
||||
window,
|
||||
LocationBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue