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

Unified Diff: ios/web/web_state/ui/wk_web_view_configuration_provider.mm

Issue 2886803002: Enable DCHECKs by default in non-official builds. (Closed)
Patch Set: fix iOS DCHECK build Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/dcheck_always_on.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/wk_web_view_configuration_provider.mm
diff --git a/ios/web/web_state/ui/wk_web_view_configuration_provider.mm b/ios/web/web_state/ui/wk_web_view_configuration_provider.mm
index e3386c5b0ad89d12ccc5f5c55095f40c906879fe..2380b4e528f29d5c3f86dac25d12e4b774500385 100644
--- a/ios/web/web_state/ui/wk_web_view_configuration_provider.mm
+++ b/ios/web/web_state/ui/wk_web_view_configuration_provider.mm
@@ -87,18 +87,20 @@ WKWebViewConfigurationProvider::GetScriptMessageRouter() {
void WKWebViewConfigurationProvider::Purge() {
DCHECK([NSThread isMainThread]);
-#if !defined(NDEBUG) || !defined(DCHECK_ALWAYS_ON) // Matches DCHECK_IS_ON.
sdefresne 2017/05/16 16:03:52 I think this should instead use DCHECK_IS_ON() (se
gab 2017/05/16 16:31:43 Ah right, that's what I intended to use, somehow g
+#if defined(DCHECK_ALWAYS_ON)
base::WeakNSObject<id> weak_configuration(configuration_);
base::WeakNSObject<id> weak_router(router_);
base::WeakNSObject<id> weak_process_pool([configuration_ processPool]);
-#endif // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
+#endif // defined(DCHECK_ALWAYS_ON)
configuration_.reset();
router_.reset();
// Make sure that no one retains configuration, router, processPool.
+#if defined(DCHECK_ALWAYS_ON)
DCHECK(!weak_configuration);
DCHECK(!weak_router);
// TODO(crbug.com/522672): Enable this DCHECK.
// DCHECK(!weak_process_pool);
+#endif // defined(DCHECK_ALWAYS_ON)
}
} // namespace web
« no previous file with comments | « build/config/dcheck_always_on.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698