WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
70966
Adopted node has a different lifetime than a parse-created node in a document
https://bugs.webkit.org/show_bug.cgi?id=70966
Summary
Adopted node has a different lifetime than a parse-created node in a document
Ryosuke Niwa
Reported
2011-10-26 13:52:06 PDT
When javascript adopts a node into a different frame, and then the frame into which the node was adopted navigates to a different page (e.g. by location.href), then the adopted node will be dead after the navigation even though a parse-created node in the original document is still alive. Furthermore, behavior is different depending on how long we wait.
Attachments
test
(3.11 KB, application/zip)
2011-10-26 14:40 PDT
,
Ryosuke Niwa
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2011-10-26 14:40:09 PDT
Created
attachment 112596
[details]
test
Ojan Vafai
Comment 2
2011-10-26 16:28:41 PDT
The only sane behavior I can think of here is that we need to keep the frame's original document alive until the reference to the adopted node goes away.
Alexey Proskuryakov
Comment 3
2011-10-27 14:02:33 PDT
This test is quite complicated. I don't think that it's showing what the title implies, and I'm not sure if it's showing any bug. Notably, the adopt() function is called twice - once when the document is loaded, and then again after you click a link to test. This is what resets "target" variable to null.
Ryosuke Niwa
Comment 4
2011-10-27 14:42:10 PDT
(In reply to
comment #3
)
> Notably, the adopt() function is called twice - once when the document is loaded, and then again after you click a link to test. This is what resets "target" variable to null.
No, if you click the one with 0 timeout, then you'll still have target variable. Only when you bump up the timeout, will you see target going away.
Alexey Proskuryakov
Comment 5
2011-10-27 15:06:15 PDT
The fact that a zero delay timer behaves differently is likely because it fires before the navigation has finished. Timing dependency doesn't necessarily mean that it's garbage collection.
Ryosuke Niwa
Comment 6
2011-10-27 15:45:23 PDT
(In reply to
comment #5
)
> The fact that a zero delay timer behaves differently is likely because it fires before the navigation has finished. Timing dependency doesn't necessarily mean that it's garbage collection.
It's probably to do with the timer in HTMLFrameElementBase.
Alexey Proskuryakov
Comment 7
2011-10-27 17:57:12 PDT
Could you please make a smaller reduction if you think that there is a bug here? What I see looks like correct behavior.
Alexey Proskuryakov
Comment 8
2013-01-24 22:27:44 PST
Still unsure what the issue here is, if any. But see
bug 107859
.
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