aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorAron Zwaan <aronzwaan@gmail.com>2019-03-30 21:03:20 +0100
committerAron Zwaan <aronzwaan@gmail.com>2019-04-03 20:45:30 +0200
commit782b58587acc754c7b378a84a4b51405738bb081 (patch)
treea530be8317cbda75e8d81679a7abc9fbd6379541 /components/script/dom/document.rs
parent6fa1853bb1e9bc80271c5259a8d2ed7799a0d6ff (diff)
downloadservo-782b58587acc754c7b378a84a4b51405738bb081.tar.gz
servo-782b58587acc754c7b378a84a4b51405738bb081.zip
Rename Promise::new to Promise::new_in_current_compartment
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index b3f08964502..3d890357e16 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -3129,9 +3129,10 @@ impl Document {
}
// https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
+ #[allow(unsafe_code)]
pub fn enter_fullscreen(&self, pending: &Element) -> Rc<Promise> {
// Step 1
- let promise = Promise::new(&self.global());
+ let promise = unsafe { Promise::new_in_current_compartment(&self.global()) };
let mut error = false;
// Step 4
@@ -3195,10 +3196,11 @@ impl Document {
}
// https://fullscreen.spec.whatwg.org/#exit-fullscreen
+ #[allow(unsafe_code)]
pub fn exit_fullscreen(&self) -> Rc<Promise> {
let global = self.global();
// Step 1
- let promise = Promise::new(&global);
+ let promise = unsafe { Promise::new_in_current_compartment(&global) };
// Step 2
if self.fullscreen_element.get().is_none() {
promise.reject_error(Error::Type(String::from("fullscreen is null")));