mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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
|
@ -81,9 +81,9 @@ use crate::dom::htmlulistelement::HTMLUListElement;
|
|||
use crate::dom::htmlunknownelement::HTMLUnknownElement;
|
||||
use crate::dom::htmlvideoelement::HTMLVideoElement;
|
||||
use crate::dom::svgsvgelement::SVGSVGElement;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use crate::script_thread::ScriptThread;
|
||||
use html5ever::{LocalName, Prefix, QualName};
|
||||
use js::jsapi::JSAutoRealm;
|
||||
use servo_config::pref;
|
||||
|
||||
fn create_svg_element(
|
||||
|
@ -157,10 +157,9 @@ fn create_html_element(
|
|||
|
||||
// Step 6.1.1
|
||||
unsafe {
|
||||
let _ac =
|
||||
JSAutoRealm::new(*cx, global.reflector().get_jsobject().get());
|
||||
let ar = enter_realm(&*global);
|
||||
throw_dom_exception(cx, &global, error);
|
||||
report_pending_exception(*cx, true);
|
||||
report_pending_exception(*cx, true, InRealm::Entered(&ar));
|
||||
}
|
||||
|
||||
// Step 6.1.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue