script: Omit GC for iframe "about:blank" document with inactive state#41284
Open
tharkum wants to merge 1 commit intoservo:mainfrom
Open
script: Omit GC for iframe "about:blank" document with inactive state#41284tharkum wants to merge 1 commit intoservo:mainfrom
iframe "about:blank" document with inactive state#41284tharkum wants to merge 1 commit intoservo:mainfrom
Conversation
6fd79f7 to
2907373
Compare
If activity state of the document is change to `Inactive` the user agent is calling garbage collection for the script global `JSContext` unconditionally and some short-lived DOM objects (which is not attached to DOM document) is immediately gone. Let's omit GC for `iframe` document with inactive state and "about:blank" URL to make GC it less aggressive for top level DOM objects. Testing: Improvements in the following tests - /html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html - /html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html - /html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html Fixes: servo#41138 Fixes: servo#41193 Fixes: servo#41221 Signed-off-by: Andrei Volykhin <[email protected]>
2907373 to
48de666
Compare
Contributor
Author
|
Implemented proposed option 4 - add condition then should be called
List of previously GC-ed objects (~88) from top-level frame on first suspended |
|
🔨 Triggering try run (#20235509924) for Linux (WPT) |
|
Test results for linux-wpt from try job (#20235509924): Flaky unexpected result (31)
Stable unexpected results that are known to be intermittent (20)
|
|
✨ Try run (#20235509924) succeeded. |
Member
|
I agree with @jdm's original comment: #41138 (comment), I think. It may be that garbage collection should be less aggressive, but maybe doing less garbage collection here is hiding a deeper correctness issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If activity state of the document is change to
Inactivethe user agent is calling garbage collection for the script globalJSContextunconditionally and some short-lived DOM objects (which is not attached to DOM document) is immediately gone.Let's omit GC for
iframedocument with inactive state and "about:blank" URL to make GC it less aggressive for top level DOM objects.Testing: Improvements in the following tests
Fixes: #41138
Fixes: #41193
Fixes: #41221