Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAvoid a constellation roundtrip when a same-origin iframe finishes loading #16109
Conversation
highfive
commented
Mar 23, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Mar 23, 2017
|
r? @asajeffrey I'm not totally convinced about these changes, but they should make some of our tests that use multiple iframes run better when under load. |
|
@bors-servo: try |
Avoid a constellation roundtrip when a same-origin iframe finishes loading - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #16108 - [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/16109) <!-- Reviewable:end -->
|
|
| LoadComplete(PipelineId), | ||
| /// has been dispatched. The boolean indicates whether the parent document | ||
| /// has been notified already. | ||
| LoadComplete(PipelineId, bool), |
This comment has been minimized.
This comment has been minimized.
|
Would we be better off keeping track of the state of whether the notification to the parent has already been sent or not? Then the script thread being notified of loading would be idempotent, and we could simplify the constellation code. We would still be sending a pointless notification message from the constellation to script, so there's an efficiency vs code simplicity trade-off here. Apart from that, and the |
|
|
|
It took me a lot of investigation to finally figure out the issue, and it's made me a bit nervous! Previously I was retrieving the frame element from the browsing context, then calling |
|
@bors-servo: try |
Avoid a constellation roundtrip when a same-origin iframe finishes loading - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #16108 - [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/16109) <!-- Reviewable:end -->
|
Yes, I saw that, I didn't realize that |
|
|
|
@bors-servo r+ |
|
|
Avoid a constellation roundtrip when a same-origin iframe finishes loading - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #16108 - [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/16109) <!-- Reviewable:end -->
|
|
…ading.
|
@bors-servo: r=asajeffrey |
|
|
Avoid a constellation roundtrip when a same-origin iframe finishes loading - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #16108 - [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/16109) <!-- Reviewable:end -->
|
|
|
|
|
The failures here come from a timing issue - if the script thread decides that a document is loaded before the constellation's document activity level notification is received, attempts to interact with the iframe's content will use the pre-navigation frame contents. I'm going to give up on this attempted optimization; I think it's going to be too difficult to maintain as part of the ever-more-complex navigation infrastructure. |
jdm commentedMar 23, 2017
•
edited by larsbergstrom
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is