Chromium Code Reviews| Index: ios/web/public/test/http_server.mm |
| diff --git a/ios/web/public/test/http_server.mm b/ios/web/public/test/http_server.mm |
| index c5217160571ec5b3fd3ce695aa0c8500d613e35a..c20f7d1dd586bcc90d78a5ecd3051f3a2887e647 100644 |
| --- a/ios/web/public/test/http_server.mm |
| +++ b/ios/web/public/test/http_server.mm |
| @@ -80,6 +80,12 @@ void HttpServer::InitHttpServer() { |
| // Note: This block is called from an arbitrary GCD thread. |
| id process_request = |
| ^GCDWebServerResponse*(GCDWebServerDataRequest* request) { |
| + |
| + // TODO(crbug.com/707764): Verify that the relaxation of the cross-thread |
|
sdefresne
2017/04/03 14:18:16
I think that a correct fix would be to:
1. split
|
| + // access restriction is correct. |
| + base::ScopedAllowCrossThreadRefCountAccess |
| + allow_cross_thread_ref_count_access; |
| + |
| ResponseProvider::Request provider_request = |
| ResponseProviderRequestFromGCDWebServerRequest(request); |
| scoped_refptr<RefCountedResponseProviderWrapper> |
| @@ -225,6 +231,10 @@ void HttpServer::RemoveResponseProvider(ResponseProvider* response_provider) { |
| void HttpServer::RemoveAllResponseProviders() { |
| DCHECK([NSThread isMainThread]); |
| + // TODO(crbug.com/707764): Verify that the relaxation of the cross-thread |
|
sdefresne
2017/04/03 14:18:16
I think you can change this to:
// Relax the cr
|
| + // access restriction is correct. |
| + base::ScopedAllowCrossThreadRefCountAccess |
| + allow_cross_thread_ref_count_access; |
| base::AutoLock autolock(provider_list_lock_); |
| providers_.clear(); |
| } |