aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmediaelement.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/htmlmediaelement.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/htmlmediaelement.rs')
-rw-r--r--components/script/dom/htmlmediaelement.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index dbc952688b1..f20a9d3ff7f 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -1651,8 +1651,9 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
}
// https://html.spec.whatwg.org/multipage/#dom-media-play
+ #[allow(unsafe_code)]
fn Play(&self) -> Rc<Promise> {
- let promise = Promise::new(&self.global());
+ let promise = unsafe { Promise::new_in_current_compartment(&self.global()) };
// Step 1.
// FIXME(nox): Reject promise if not allowed to play.