mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Pass a JSRef to RegisterBindings::Register.
JS<T> should only be used for members of traced structures; the correct type for arguments is JSRef.
This commit is contained in:
parent
57e8be0c8f
commit
44f57ae6da
2 changed files with 3 additions and 3 deletions
|
@ -2078,7 +2078,7 @@ class CGDefineDOMInterfaceMethod(CGAbstractMethod):
|
||||||
"""
|
"""
|
||||||
def __init__(self, descriptor):
|
def __init__(self, descriptor):
|
||||||
args = [
|
args = [
|
||||||
Argument('&JS<Window>', 'window'),
|
Argument('&JSRef<Window>', 'window'),
|
||||||
Argument('&mut JSPageInfo', 'js_info'),
|
Argument('&mut JSPageInfo', 'js_info'),
|
||||||
]
|
]
|
||||||
CGAbstractMethod.__init__(self, descriptor, 'DefineDOMInterface', 'void', args, pub=True)
|
CGAbstractMethod.__init__(self, descriptor, 'DefineDOMInterface', 'void', args, pub=True)
|
||||||
|
@ -4192,7 +4192,7 @@ class CGDictionary(CGThing):
|
||||||
class CGRegisterProtos(CGAbstractMethod):
|
class CGRegisterProtos(CGAbstractMethod):
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
arguments = [
|
arguments = [
|
||||||
Argument('&JS<Window>', 'window'),
|
Argument('&JSRef<Window>', 'window'),
|
||||||
Argument('&mut JSPageInfo', 'js_info'),
|
Argument('&mut JSPageInfo', 'js_info'),
|
||||||
]
|
]
|
||||||
CGAbstractMethod.__init__(self, None, 'Register', 'void', arguments,
|
CGAbstractMethod.__init__(self, None, 'Register', 'void', arguments,
|
||||||
|
|
|
@ -956,7 +956,7 @@ impl ScriptTask {
|
||||||
|
|
||||||
with_compartment((**cx).ptr, window.reflector().get_jsobject(), || {
|
with_compartment((**cx).ptr, window.reflector().get_jsobject(), || {
|
||||||
let mut js_info = page.mut_js_info();
|
let mut js_info = page.mut_js_info();
|
||||||
RegisterBindings::Register(&window.unrooted(), js_info.get_mut_ref());
|
RegisterBindings::Register(&*window, js_info.get_mut_ref());
|
||||||
});
|
});
|
||||||
|
|
||||||
self.compositor.set_ready_state(Loading);
|
self.compositor.set_ready_state(Loading);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue