WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
200359
DOMWindow properties may get GC'd before their Window object
https://bugs.webkit.org/show_bug.cgi?id=200359
Summary
DOMWindow properties may get GC'd before their Window object
Chris Dumez
Reported
2019-08-01 14:22:58 PDT
DOMWindow properties may get GC'd before their Window object once their frame is detached. This is unexpected behavior given that these properties persist on the Window after the frame is detached.
Attachments
Patch
(14.23 KB, patch)
2019-08-01 14:27 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(14.84 KB, patch)
2019-08-02 08:21 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-08-01 14:27:36 PDT
Created
attachment 375345
[details]
Patch
Ryosuke Niwa
Comment 2
2019-08-01 22:36:23 PDT
Comment on
attachment 375345
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=375345&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4683 > + } elsif (GetGenerateIsReachable($interface) eq "ImplWindow") {
Can we use more sensible names like ReachableFromDOMWindow? I really hate these Impl*. It doesn't explain what it does at all.
> LayoutTests/fast/dom/dom-window-property-gc-after-frame-detach.html:13 > + w = document.getElementById("testFrame").contentWindow;
Nit: Please don't use one letter variable like w.
> LayoutTests/fast/dom/dom-window-property-gc-after-frame-detach.html:14 > + for (let p of window_properties)
Dito for p. Also use camelCase?
> LayoutTests/fast/dom/dom-window-property-gc-after-frame-detach.html:17 > + for (let p of window_properties)
Ditto.
> LayoutTests/fast/dom/dom-window-property-gc-after-frame-detach.html:26 > + for (let p of window_properties)
Ditto.
Chris Dumez
Comment 3
2019-08-02 08:21:32 PDT
Created
attachment 375410
[details]
Patch
WebKit Commit Bot
Comment 4
2019-08-02 09:44:02 PDT
Comment on
attachment 375410
[details]
Patch Clearing flags on attachment: 375410 Committed
r248155
: <
https://trac.webkit.org/changeset/248155
>
WebKit Commit Bot
Comment 5
2019-08-02 09:44:04 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2019-08-02 09:49:13 PDT
<
rdar://problem/53866998
>
Darin Adler
Comment 7
2019-08-04 11:14:46 PDT
Is there any case where using ImplFrame is correct, now?
Chris Dumez
Comment 8
2019-08-05 08:11:39 PDT
(In reply to Darin Adler from
comment #7
)
> Is there any case where using ImplFrame is correct, now?
It is only used by Geolocation now. navigator.geolocation never returns null (e.g. when the frame is detached), so I do not think it makes sense to tie to lifetime of its wrapper to the frame. We should tie it to the Window instead. I'll follow-up.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug