Suspicious document leak when using find-in-page |
||
Issue descriptionChrome Version: ToT OS: Tested on Ubuntu x64, but I think this can happen on all desktop platforms What steps will reproduce the problem? (1) Apply patch https://chromium-review.googlesource.com/c/600149 just to see the 'outlive time' of documents (the time means how many GC happens after the document is shut down and before the document is actually destroyed) (2) Open the attached html (3) Search any word in the page like 'search' (don't close the search window) (4) Reload the page like 20 times (5) Search any word again and close the search window (6) Reload the page again (7) See the UMA 'Document.OutliveTimeAfterShutdown.DestroyedBeforeProcessDies' at chrome://histograms and see the result What is the expected result? The numbers in the UMA should be less than 10 or so. What happens instead? The number can be larger than 10: this is almost same as the number how many reload happens. It looks like the document of the first search survives until the next search happens. Please use labels and text to provide additional information. For graphics-related bugs, please copy/paste the contents of the about:gpu page at the end of this report.
,
Aug 10 2017
,
Aug 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ff6179ee517e2db9ac19ed0cfe8617012f632d30 commit ff6179ee517e2db9ac19ed0cfe8617012f632d30 Author: Hajime Hoshi <hajimehoshi@chromium.org> Date: Mon Aug 14 09:36:50 2017 Reset members at TextFinder::StopFindingAndClearSelection to avoid document leaks A document is leaked via a TextFinder since TextFinder's |active_match_| and |resume_scoping_from_range_| are not reset even after the find-in- page UI is closed e.g. when reloading, and TextFinder keeps the document until the members are updated e.g. when a new find-in-page is started. This CL resets |active_match_| and |resume_scoping_from_range_| so that the document object is no longer kept after the find-in-page UI is closed. Bug: 752902 Change-Id: I56b4f86c406f595d53503f8042bf1bca927f1f38 Reviewed-on: https://chromium-review.googlesource.com/609762 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org> Cr-Commit-Position: refs/heads/master@{#494025} [modify] https://crrev.com/ff6179ee517e2db9ac19ed0cfe8617012f632d30/third_party/WebKit/Source/core/editing/TextFinder.cpp
,
Aug 14 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by hajimehoshi@chromium.org
, Aug 7 2017