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

Issue 2695593011: Error pages: Break retain cycle NativeContent/StaticHTMLViewController (Closed)

Created:
3 years, 10 months ago by Olivier
Modified:
3 years, 10 months ago
CC:
chromium-reviews, pkl (ping after 24h if needed), jam, noyau+watch_chromium.org, marq+watch_chromium.org, darin-cc_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Error pages: Break retain cycle NativeContent/StaticHTMLViewController StaticHTMLViewController retains the generator. The generator is implementated by ErrorPageContent, which retain the StaticHTMLViewController. This leads to a leak and the WKWebView is never released. BUG=693178 Review-Url: https://codereview.chromium.org/2695593011 Cr-Commit-Position: refs/heads/master@{#451609} Committed: https://chromium.googlesource.com/chromium/src/+/fc155c2704ad95817d98efb4c3dbec239c4c17cb

Patch Set 1 #

Total comments: 4

Patch Set 2 : feedback #

Total comments: 8

Patch Set 3 : feedback #

Patch Set 4 : split ErrorPageGenerator and fix unittests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -216 lines) Patch
M ios/chrome/browser/ui/static_content/static_html_view_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/web/BUILD.gn View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ios/chrome/browser/web/DEPS View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/web/error_page_content.h View 1 2 3 1 chunk +1 line, -6 lines 0 comments Download
M ios/chrome/browser/web/error_page_content.mm View 1 2 3 2 chunks +7 lines, -48 lines 0 comments Download
D ios/chrome/browser/web/error_page_content_unittest.mm View 1 2 3 1 chunk +0 lines, -116 lines 0 comments Download
A ios/chrome/browser/web/error_page_generator.h View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/error_page_generator.mm View 1 2 3 1 chunk +74 lines, -0 lines 0 comments Download
A + ios/chrome/browser/web/error_page_generator_unittest.mm View 1 2 3 3 chunks +25 lines, -44 lines 0 comments Download

Messages

Total messages: 18 (8 generated)
Olivier
3 years, 10 months ago (2017-02-17 08:53:14 UTC) #2
marq (ping after 24h)
lgtm
3 years, 10 months ago (2017-02-17 10:25:57 UTC) #3
stkhapugin
lgtm with comments https://codereview.chromium.org/2695593011/diff/1/ios/chrome/browser/web/error_page_content.h File ios/chrome/browser/web/error_page_content.h (left): https://codereview.chromium.org/2695593011/diff/1/ios/chrome/browser/web/error_page_content.h#oldcode20 ios/chrome/browser/web/error_page_content.h:20: base::scoped_nsobject<NSString> html_; I think you don't ...
3 years, 10 months ago (2017-02-17 13:12:44 UTC) #4
Olivier
Thanks https://codereview.chromium.org/2695593011/diff/1/ios/chrome/browser/web/error_page_content.h File ios/chrome/browser/web/error_page_content.h (left): https://codereview.chromium.org/2695593011/diff/1/ios/chrome/browser/web/error_page_content.h#oldcode20 ios/chrome/browser/web/error_page_content.h:20: base::scoped_nsobject<NSString> html_; On 2017/02/17 13:12:44, stkhapugin wrote: > ...
3 years, 10 months ago (2017-02-17 13:58:39 UTC) #5
Eugene But (OOO till 7-30)
LGTM! https://codereview.chromium.org/2695593011/diff/20001/ios/chrome/browser/web/error_page_content.mm File ios/chrome/browser/web/error_page_content.mm (right): https://codereview.chromium.org/2695593011/diff/20001/ios/chrome/browser/web/error_page_content.mm#newcode10 ios/chrome/browser/web/error_page_content.mm:10: #include "base/mac/scoped_nsobject.h" nit: s/include/import https://codereview.chromium.org/2695593011/diff/20001/ios/chrome/browser/web/error_page_content.mm#newcode26 ios/chrome/browser/web/error_page_content.mm:26: @interface ErrorPageGenerator ...
3 years, 10 months ago (2017-02-17 18:37:55 UTC) #6
Olivier
https://codereview.chromium.org/2695593011/diff/20001/ios/chrome/browser/web/error_page_content.mm File ios/chrome/browser/web/error_page_content.mm (right): https://codereview.chromium.org/2695593011/diff/20001/ios/chrome/browser/web/error_page_content.mm#newcode10 ios/chrome/browser/web/error_page_content.mm:10: #include "base/mac/scoped_nsobject.h" On 2017/02/17 18:37:54, Eugene But wrote: > ...
3 years, 10 months ago (2017-02-20 08:47:00 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2695593011/40001
3 years, 10 months ago (2017-02-20 08:47:13 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xcode-clang/builds/45737)
3 years, 10 months ago (2017-02-20 08:54:40 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2695593011/60001
3 years, 10 months ago (2017-02-20 11:57:31 UTC) #15
commit-bot: I haz the power
3 years, 10 months ago (2017-02-20 12:59:58 UTC) #18
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/fc155c2704ad95817d98efb4c3db...

Powered by Google App Engine
This is Rietveld 408576698