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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1055413002: Don't crash service process on start initializing V8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/allocator/allocator_extension.h" 9 #include "base/allocator/allocator_extension.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 #else 696 #else
697 CHECK(base::i18n::InitializeICU()); 697 CHECK(base::i18n::InitializeICU());
698 #endif // OS_ANDROID 698 #endif // OS_ANDROID
699 699
700 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 700 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
701 #if defined(OS_POSIX) && !defined(OS_MACOSX) 701 #if defined(OS_POSIX) && !defined(OS_MACOSX)
702 #if !defined(OS_ANDROID) 702 #if !defined(OS_ANDROID)
703 // kV8NativesDataDescriptor and kV8SnapshotDataDescriptor are shared with 703 // kV8NativesDataDescriptor and kV8SnapshotDataDescriptor are shared with
704 // child processes. On Android they are set in 704 // child processes. On Android they are set in
705 // ChildProcessService::InternalInitChildProcess, otherwise set them here. 705 // ChildProcessService::InternalInitChildProcess, otherwise set them here.
706 if (!process_type.empty() && process_type != switches::kZygoteProcess) { 706 if (!process_type.empty() && process_type != switches::kZygoteProcess
707 && process_type != "service") {
707 g_fds->Set( 708 g_fds->Set(
708 kV8NativesDataDescriptor, 709 kV8NativesDataDescriptor,
709 kV8NativesDataDescriptor + base::GlobalDescriptors::kBaseDescriptor); 710 kV8NativesDataDescriptor + base::GlobalDescriptors::kBaseDescriptor);
710 g_fds->Set( 711 g_fds->Set(
711 kV8SnapshotDataDescriptor, 712 kV8SnapshotDataDescriptor,
712 kV8SnapshotDataDescriptor + base::GlobalDescriptors::kBaseDescriptor); 713 kV8SnapshotDataDescriptor + base::GlobalDescriptors::kBaseDescriptor);
713 } 714 }
714 #endif // !OS_ANDROID 715 #endif // !OS_ANDROID
715 int v8_natives_fd = g_fds->MaybeGet(kV8NativesDataDescriptor); 716 int v8_natives_fd = g_fds->MaybeGet(kV8NativesDataDescriptor);
716 int v8_snapshot_fd = g_fds->MaybeGet(kV8SnapshotDataDescriptor); 717 int v8_snapshot_fd = g_fds->MaybeGet(kV8SnapshotDataDescriptor);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 834
834 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 835 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
835 }; 836 };
836 837
837 // static 838 // static
838 ContentMainRunner* ContentMainRunner::Create() { 839 ContentMainRunner* ContentMainRunner::Create() {
839 return new ContentMainRunnerImpl(); 840 return new ContentMainRunnerImpl();
840 } 841 }
841 842
842 } // namespace content 843 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698