Chromium Code Reviews| 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 |