Skip to content
Permalink
Browse files

Add a realm

  • Loading branch information
Manishearth committed Jan 8, 2020
1 parent f721113 commit c89f79b132e0bf2a5ad3462f2ce695039dec67a2
Showing with 4 additions and 1 deletion.
  1. +2 −1 components/script/dom/xrinputsourceschangeevent.rs
  2. +2 −0 components/script/dom/xrviewerpose.rs
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use crate::compartments::enter_realm;
use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
use crate::dom::bindings::codegen::Bindings::XRInputSourcesChangeEventBinding::{
self, XRInputSourcesChangeEventMethods,
@@ -62,7 +63,7 @@ impl XRInputSourcesChangeEvent {
let event = changeevent.upcast::<Event>();
event.init_event(type_, bubbles, cancelable);
}

let _ac = enter_realm(&*global);
let cx = global.get_cx();
unsafe {
rooted!(in(*cx) let mut added_val = UndefinedValue());
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use crate::compartments::enter_realm;
use crate::dom::bindings::codegen::Bindings::XRViewBinding::XREye;
use crate::dom::bindings::codegen::Bindings::XRViewerPoseBinding;
use crate::dom::bindings::codegen::Bindings::XRViewerPoseBinding::XRViewerPoseMethods;
@@ -40,6 +41,7 @@ impl XRViewerPose {
session: &XRSession,
pose: ApiViewerPose,
) -> DomRoot<XRViewerPose> {
let _ac = enter_realm(&*global);
rooted_vec!(let mut views);
session.with_session(|s| match s.views() {
Views::Inline => views.push(XRView::new(

0 comments on commit c89f79b

Please sign in to comment.
You can’t perform that action at this time.