mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use incumbent global for postmessage origin check.
This commit is contained in:
parent
51ab14086c
commit
ec6a936f5c
1 changed files with 1 additions and 5 deletions
|
@ -865,11 +865,7 @@ impl WindowMethods for Window {
|
||||||
// Step 3-5.
|
// Step 3-5.
|
||||||
let origin = match &origin[..] {
|
let origin = match &origin[..] {
|
||||||
"*" => None,
|
"*" => None,
|
||||||
"/" => {
|
"/" => Some(source.Document().origin().immutable().clone()),
|
||||||
// TODO(#12715): Should be the origin of the incumbent settings
|
|
||||||
// object, not self's.
|
|
||||||
Some(self.Document().origin().immutable().clone())
|
|
||||||
},
|
|
||||||
url => match ServoUrl::parse(&url) {
|
url => match ServoUrl::parse(&url) {
|
||||||
Ok(url) => Some(url.origin().clone()),
|
Ok(url) => Some(url.origin().clone()),
|
||||||
Err(_) => return Err(Error::Syntax),
|
Err(_) => return Err(Error::Syntax),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue