mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Always pass InRealm to GlobalScope::from_context to avoid getting null global
This commit is contained in:
parent
795dab71ff
commit
403ffcf1eb
16 changed files with 79 additions and 61 deletions
|
@ -673,7 +673,7 @@ impl WindowMethods for Window {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-opener
|
||||
fn Opener(&self, cx: JSContext) -> JSVal {
|
||||
fn Opener(&self, cx: JSContext, in_realm_proof: InRealm) -> JSVal {
|
||||
// Step 1, Let current be this Window object's browsing context.
|
||||
let current = match self.window_proxy.get() {
|
||||
Some(proxy) => proxy,
|
||||
|
@ -688,7 +688,7 @@ impl WindowMethods for Window {
|
|||
return NullValue();
|
||||
}
|
||||
// Step 3 to 5.
|
||||
current.opener(*cx)
|
||||
current.opener(*cx, in_realm_proof)
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue