Summary: | Properties set on window.customElements can disappear due to GC | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Russell Bicknell <bicknellr> | ||||||||||
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | cdumez, darin, dbates, esprehn+autocc, ews-watchlist, fpizlo, fred.wang, kangil.han, kondapallykalyan, mark.lam, rniwa, saam, sam, tsavell, webkit-bug-importer, ysuzuki | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | Safari 10 | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 154907, 188353 | ||||||||||||
Attachments: |
|
Description
Russell Bicknell
2017-05-24 20:35:52 PDT
Created attachment 311187 [details]
test.html
Created attachment 311188 [details]
index.html
Comment on attachment 311187 [details]
test.html
<script>
// Uncomment this section to prevent the bug.
/*
Object.defineProperty(window, 'customElements', {
value: window.customElements,
});
*/
window.customElements.prop = 1234;
const a = [];
for (let i = 0; i < 1000000; i++) {
a.push({});
}
const pass = window.customElements.prop === 1234;
window.parent.postMessage(pass, '*');
</script>
Created attachment 311189 [details]
test.html
This seems like it's probably related to 171567. (In reply to Russell Bicknell from comment #5) > This seems like it's probably related to 171567. It's not. Created attachment 346581 [details]
Fixes the bug
Committed r234578: <https://trac.webkit.org/changeset/234578> Comment on attachment 346581 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=346581&action=review > Source/WebCore/dom/CustomElementRegistry.idl:29 > EnabledAtRuntime=CustomElements, > - ImplementationLacksVTable, > JSGenerateToNativeObject, > + GenerateIsReachable=ImplScriptExecutionContext We’ve been sorting these alphabetically and putting commas on every line. So this should be a line higher and have a comma. Sure. Fixed it in r234585. Looks like the new test fast/custom-elements/custom-element-registry-wrapper-should-stay-alive.html is a constant timeout on all debug platforms. Test History: https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fcustom-elements%2Fcustom-element-registry-wrapper-should-stay-alive.html Yeah, noticed. Will look into it today. The test failure is tracked by https://bugs.webkit.org/show_bug.cgi?id=188353. |