New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory leak when using webFrame and spell checker #16770
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zcbenz
force-pushed
the
web-frame-refactor
branch
3 times, most recently
from
February 6, 2019 08:34
6ada33d
to
7703b05
Compare
deepak1556
reviewed
Feb 6, 2019
This was referenced Feb 6, 2019
zcbenz
force-pushed
the
web-frame-refactor
branch
2 times, most recently
from
February 6, 2019 11:51
1d429ad
to
15cd616
Compare
6 tasks
When reloading a page without restarting renderer process (for example sandbox mode), the blink::WebFrame is not destroyed, but api::WebFrame is always recreated for the new page context. This leaves a leak of api::WebFrame.
zcbenz
force-pushed
the
web-frame-refactor
branch
from
February 6, 2019 23:31
15cd616
to
437b06a
Compare
deepak1556
approved these changes
Feb 7, 2019
nitsakh
approved these changes
Feb 7, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 Thanks!
Release Notes Persisted
|
I have automatically backported this PR to "5-0-x", please check out #16851 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Close #15459.
When using spell checker in pages with sandbox, there are two sources of memory leak:
api::WebFrame
, and the old one would be leaked since the renderer process is not restarted.blink::WebFrame
.This PR fixes the leak with 2 methods:
api::WebFrame
instances, the native methods become simple getters without a global state. So no memory will be leaked on reload, and the code now is cleaner and uses less memory.Note that this PR should be rebased instead of squashed as the commits have clear responsibilities.
Checklist
npm test
passesRelease Notes
Notes: Fix memory leak when using webFrame and spell checker.