Skip to content

Implement source for postMessage events - #22514

Merged
bors-servo merged 7 commits into
servo:masterfrom
jdm:source
Jan 8, 2019
Merged

bors-servo merged 7 commits into
servo:masterfrom
jdm:source

Conversation

@jdm

@jdm jdm commented Dec 20, 2018 •

Copy link
Copy Markdown
Member

Also make similar-origin iframes access their newly loaded document as soon as the new document is created. This should allow tests that check the event.source property to run correctly.



This change is Reviewable

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Error syncing changes upstream. Logs saved in error-snapshot-1545341457705.

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/script_thread.rs, components/script/dom/worker.rs, components/script/dom/webidls/MessageEvent.webidl, components/script/dom/messageevent.rs, components/script/dom/eventsource.rs and 5 more
  • @cbrewster: components/constellation/constellation.rs
  • @jgraham: tests/wpt/include.ini
  • @paulrouget: components/constellation/constellation.rs
  • @KiChjang: components/script_traits/lib.rs, components/script_traits/script_msg.rs, components/script/script_thread.rs, components/script/dom/worker.rs, components/script/dom/webidls/MessageEvent.webidl and 6 more

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 20, 2018
@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@jdm

jdm commented Dec 20, 2018

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit ccbfb92 with merge c5bbdae...

bors-servo pushed a commit that referenced this pull request Dec 20, 2018
Implement source for postMessage events

This should allow tests that check the event.source property to run correctly.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22499 and fix #12715.
- [x] There are tests for these changes
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Dec 20, 2018
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Dec 20, 2018
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Opened new PR for upstreamable changes.

Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#14634.

rooted!(in(scope.get_cx()) let mut message = UndefinedValue());
data.read(scope.upcast(), message.handle_mut());
MessageEvent::dispatch_jsval(target, scope.upcast(), message.handle(), None);
MessageEvent::dispatch_jsval(target, scope.upcast(), message.handle(), None, None);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some day we're gonna have to use the builder pattern for this :)

@jdm

jdm commented Dec 21, 2018

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 0797998 with merge 3ebe83a...

bors-servo pushed a commit that referenced this pull request Dec 21, 2018
Implement source for postMessage events

Also make similar-origin iframes access their newly loaded document as soon as the new document is created. This should allow tests that check the event.source property to run correctly.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22499 and fix #12715 and fix #22514.
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22514)
<!-- Reviewable:end -->
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#14634.

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-tests-failed The changes caused existing tests to fail. labels Dec 21, 2018
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#14634.

@jdm

jdm commented Dec 21, 2018

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 07f38f5 with merge 870d694...

bors-servo pushed a commit that referenced this pull request Dec 21, 2018
Implement source for postMessage events

Also make similar-origin iframes access their newly loaded document as soon as the new document is created. This should allow tests that check the event.source property to run correctly.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22499 and fix #12715 and fix #22514.
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22514)
<!-- Reviewable:end -->
@jdm

jdm commented Dec 21, 2018

Copy link
Copy Markdown
Member Author

I feel so much better about the referrer-policy tests now.

@jdm

jdm commented Dec 21, 2018

Copy link
Copy Markdown
Member Author

r? @Manishearth

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jan 7, 2019
@CYBAI

CYBAI commented Jan 8, 2019

Copy link
Copy Markdown
Member

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9afa722 with merge c050229...

bors-servo pushed a commit that referenced this pull request Jan 8, 2019
Implement source for postMessage events

Also make similar-origin iframes access their newly loaded document as soon as the new document is created. This should allow tests that check the event.source property to run correctly.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22499 and fix #12715 and fix #22514.
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22514)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 8, 2019
@CYBAI

CYBAI commented Jan 8, 2019

Copy link
Copy Markdown
Member

oops, I found Travis is complaining about tidy

Diff in /home/travis/build/servo/servo/components/script/script_thread.rs at line 2110:
                         return warn!(
                             "postMessage after source pipeline {} closed.",
                             source_pipeline_id,
-                        )
+                        );
                     },
                     Some(source) => source,
                 };
Run `./mach fmt` to fix the formatting

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 8, 2019
@jdm

jdm commented Jan 8, 2019

Copy link
Copy Markdown
Member Author

Thanks for noticing!
@bors-servo r=Manishearth

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 8ff0c41 has been approved by Manishearth

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jan 8, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 8ff0c41 with merge 11d1184...

bors-servo pushed a commit that referenced this pull request Jan 8, 2019
Implement source for postMessage events

Also make similar-origin iframes access their newly loaded document as soon as the new document is created. This should allow tests that check the event.source property to run correctly.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22499 and fix #12715 and fix #22514.
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22514)
<!-- Reviewable:end -->
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#14634.

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android-mac, arm32, arm64, linux-rel-css, linux-rel-wpt, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, magicleap, status-taskcluster
Approved by: Manishearth
Pushing 11d1184 to master...

@bors-servo
bors-servo merged commit 8ff0c41 into servo:master Jan 8, 2019
@highfive highfive removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 8, 2019
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Error syncing changes upstream. Logs saved in error-snapshot-1546923619003.

@CYBAI

CYBAI commented Jan 8, 2019

Copy link
Copy Markdown
Member

Error syncing changes upstream. Logs saved in error-snapshot-1546923619003.

I found web-platform-tests/wpt#14634 is not merged but the labels are removed 🤔

@jdm

jdm commented Jan 8, 2019

Copy link
Copy Markdown
Member Author

Merged upstream manually in web-platform-tests/wpt#14634.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement MessageEvent.source Use incumbent settings object for Window::postMessage.

8 participants