summaryrefslogtreecommitdiffstats
path: root/content/app/content_main_runner.cc
diff options
context:
space:
mode:
authorstuartmorgan <stuartmorgan@chromium.org>2015-01-30 15:13:46 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-30 23:14:47 +0000
commit839634ad8f32b814c2829d912bfb26b17fe03ac7 (patch)
tree95cb4c0cf0e3b795c7b6d564a35381c3be6a0e5f /content/app/content_main_runner.cc
parentcebaf8cb5f60a5e3f3ecbfd65ebb338c90dba400 (diff)
downloadchromium_src-839634ad8f32b814c2829d912bfb26b17fe03ac7.zip
chromium_src-839634ad8f32b814c2829d912bfb26b17fe03ac7.tar.gz
chromium_src-839634ad8f32b814c2829d912bfb26b17fe03ac7.tar.bz2
Don't set up an autorelease pool in ContentMainRunner on iOS
This causes crashes if the shutdown path is used on iOS, because on iOS there's already a higher-level autorelease pool by the time this code can be run. BUG=None Review URL: https://codereview.chromium.org/891843002 Cr-Commit-Position: refs/heads/master@{#314021}
Diffstat (limited to 'content/app/content_main_runner.cc')
-rw-r--r--content/app/content_main_runner.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 2bd0acd..378a509 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -578,7 +578,10 @@ class ContentMainRunnerImpl : public ContentMainRunner {
}
#endif // !OS_ANDROID && !OS_IOS
-#if defined(OS_MACOSX)
+ // Don't create this loop on iOS, since the outer loop is already handled
+ // and a loop that's destroyed in shutdown interleaves badly with the event
+ // loop pool on iOS.
+#if defined(OS_MACOSX) && !defined(OS_IOS)
// We need this pool for all the objects created before we get to the
// event loop, but we don't want to leave them hanging around until the
// app quits. Each "main" needs to flush this pool right before it goes into
@@ -822,7 +825,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
#endif // _CRTDBG_MAP_ALLOC
#endif // OS_WIN
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(OS_IOS)
autorelease_pool_.reset(NULL);
#endif