WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
79001
undo manager retains RefPtr to nodes in documents that would otherwise have been GC'ed
https://bugs.webkit.org/show_bug.cgi?id=79001
Summary
undo manager retains RefPtr to nodes in documents that would otherwise have b...
Ryosuke Niwa
Reported
2012-02-19 14:04:07 PST
Because WebKit's undo manager manages undo stack at the page level, all documents that have ever been edited on the same page will be kept in memory even if there were no other references to it. This is pretty silly because we can't even undo editing actions on an unloaded frame/document even if the user had loaded it back.
Attachments
proof of concept wip patch
(15.98 KB, patch)
2012-02-19 22:18 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2012-02-19 14:06:43 PST
Since none of our editing actions do cross-frame editing, we should be able to delete all UndoStep objects that belong to an unloaded frame.
Alexey Proskuryakov
Comment 2
2012-02-19 20:41:05 PST
When are the undo steps currently cleared?
Ryosuke Niwa
Comment 3
2012-02-19 21:32:19 PST
(In reply to
comment #2
)
> When are the undo steps currently cleared?
It's cleared when the page is unloaded in FrameLoader::closeURL.
Ryosuke Niwa
Comment 4
2012-02-19 22:18:00 PST
Created
attachment 127761
[details]
proof of concept wip patch
Ryosuke Niwa
Comment 5
2012-02-19 22:20:24 PST
Comment on
attachment 127761
[details]
proof of concept wip patch Here's my attempt to mitigate this issue. I'm removing all undo step objects when the frame is destroyed. For Mac port, this can be done by creating targets for each "host" document and then removing all targets when the corresponding frame is destroyed. I probably need to hash out the details but it compiles & loads pages as is.
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