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

Side by Side Diff: ios/web/web_state/ui/wk_web_view_configuration_provider.mm

Issue 2949673002: Settings EG Test Autorelease Fix
Patch Set: Remove DCHECKs Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" 5 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #import <WebKit/WebKit.h> 8 #import <WebKit/WebKit.h>
9 9
10 #import "base/ios/weak_nsobject.h" 10 #import "base/ios/weak_nsobject.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 WKUserContentController* userContentController = 80 WKUserContentController* userContentController =
81 [GetWebViewConfiguration() userContentController]; 81 [GetWebViewConfiguration() userContentController];
82 router_.reset([[CRWWKScriptMessageRouter alloc] 82 router_.reset([[CRWWKScriptMessageRouter alloc]
83 initWithUserContentController:userContentController]); 83 initWithUserContentController:userContentController]);
84 } 84 }
85 return router_; 85 return router_;
86 } 86 }
87 87
88 void WKWebViewConfigurationProvider::Purge() { 88 void WKWebViewConfigurationProvider::Purge() {
89 DCHECK([NSThread isMainThread]); 89 DCHECK([NSThread isMainThread]);
90 #if DCHECK_IS_ON()
91 base::WeakNSObject<id> weak_configuration(configuration_);
92 base::WeakNSObject<id> weak_router(router_);
93 base::WeakNSObject<id> weak_process_pool([configuration_ processPool]);
94 #endif // DCHECK_IS_ON()
95 configuration_.reset(); 90 configuration_.reset();
96 router_.reset(); 91 router_.reset();
97 // Make sure that no one retains configuration, router, processPool.
98 #if DCHECK_IS_ON()
99 DCHECK(!weak_configuration);
100 DCHECK(!weak_router);
101 // TODO(crbug.com/522672): Enable this DCHECK.
102 // DCHECK(!weak_process_pool);
103 #endif // DCHECK_IS_ON()
104 } 92 }
105 93
106 } // namespace web 94 } // namespace web
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698