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

Unified Diff: ios/crnet/CrNet.mm

Issue 2134843002: Fixed crashes in CrNetEnvironment::ConfigureSdchOnNetworkThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/crnet/CrNet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/CrNet.mm
diff --git a/ios/crnet/CrNet.mm b/ios/crnet/CrNet.mm
index 72cee6e76a24ff1fa131f1978b4ce7e73dbc17ce..f040e25f134435060148622de19900d521431f3d 100644
--- a/ios/crnet/CrNet.mm
+++ b/ios/crnet/CrNet.mm
@@ -59,7 +59,13 @@ static RequestFilterBlock g_request_filter_block = nil;
+ (void)install {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
+ if (![NSThread isMainThread]) {
+ dispatch_sync(dispatch_get_main_queue(), ^(void) {
+ [self installInternal];
+ });
+ } else {
[self installInternal];
+ }
});
}
« no previous file with comments | « ios/crnet/CrNet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698