diff options
author | Josh Matthews <josh@joshmatthews.net> | 2018-12-20 16:18:34 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2019-01-07 22:19:26 -0500 |
commit | ec6a936f5cd61c1c304d6b1ab76bd3090fc5a56e (patch) | |
tree | b6a807d2b4dfc093760fa112371f749519ae88da /components/script/dom/window.rs | |
parent | 51ab14086cd635a3d2a7826e25ff96d679e265c7 (diff) | |
download | servo-ec6a936f5cd61c1c304d6b1ab76bd3090fc5a56e.tar.gz servo-ec6a936f5cd61c1c304d6b1ab76bd3090fc5a56e.zip |
Use incumbent global for postmessage origin check.
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r-- | components/script/dom/window.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 533db98e05b..bcda545a8cb 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -865,11 +865,7 @@ impl WindowMethods for Window { // Step 3-5. let origin = match &origin[..] { "*" => None, - "/" => { - // TODO(#12715): Should be the origin of the incumbent settings - // object, not self's. - Some(self.Document().origin().immutable().clone()) - }, + "/" => Some(source.Document().origin().immutable().clone()), url => match ServoUrl::parse(&url) { Ok(url) => Some(url.origin().clone()), Err(_) => return Err(Error::Syntax), |