Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Issue 1869973002: Don't leak old Activity when reparenting native pages. (Closed)

Created:
4 years, 8 months ago by newt (away)
Modified:
4 years, 8 months ago
Reviewers:
Yusuf
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@move_improvements
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't leak old Activity when reparenting native pages. NativePages hold references to the Activity in which they're created. In particular, each NativePage's View is inflated using the Activity context. To avoid leaking the old Activity when reparenting a NativePage, Tab.attachAndFinishReparenting() now recreates the NativePage (equivalent to pressing "reload"). This loses the scroll position on the page, but otherwise doesn't have many downsides and is simpler and more fool-proof than removing all Activity references from the NativePage. (Removing Activity references also has the downside that we wouldn't be able to use appcompat widgets in native pages.) BUG=595889 Committed: https://crrev.com/b7670439dd84d55486d5d453ce2b164e7d3aeb61 Cr-Commit-Position: refs/heads/master@{#386141}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -3 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java View 2 chunks +8 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 8 (3 generated)
newt (away)
PTAL Simple, and anecdotally, the performance impact isn't noticeable.
4 years, 8 months ago (2016-04-08 00:56:41 UTC) #2
Yusuf
lgtm
4 years, 8 months ago (2016-04-08 17:42:39 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869973002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869973002/1
4 years, 8 months ago (2016-04-08 17:43:02 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-08 18:44:54 UTC) #6
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 18:46:41 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/b7670439dd84d55486d5d453ce2b164e7d3aeb61
Cr-Commit-Position: refs/heads/master@{#386141}

Powered by Google App Engine
This is Rietveld 408576698