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

Side by Side Diff: content/zygote/zygote_main_linux.cc

Issue 103623003: Instrument pepper plugin load failures. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years 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 | « content/renderer/render_frame_impl.cc ('k') | 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/zygote/zygote_main.h" 5 #include "content/zygote/zygote_main.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <pthread.h> 10 #include <pthread.h>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // call PPP_InitializeModule). This is needed by the zygote on Linux to get 255 // call PPP_InitializeModule). This is needed by the zygote on Linux to get
256 // access to the plugins before entering the sandbox. 256 // access to the plugins before entering the sandbox.
257 void PreloadPepperPlugins() { 257 void PreloadPepperPlugins() {
258 std::vector<PepperPluginInfo> plugins; 258 std::vector<PepperPluginInfo> plugins;
259 ComputePepperPluginList(&plugins); 259 ComputePepperPluginList(&plugins);
260 for (size_t i = 0; i < plugins.size(); ++i) { 260 for (size_t i = 0; i < plugins.size(); ++i) {
261 if (!plugins[i].is_internal && plugins[i].is_sandboxed) { 261 if (!plugins[i].is_internal && plugins[i].is_sandboxed) {
262 std::string error; 262 std::string error;
263 base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path, 263 base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path,
264 &error); 264 &error);
265 DLOG_IF(WARNING, !library) << "Unable to load plugin " 265 VLOG_IF(1, !library) << "Unable to load plugin "
266 << plugins[i].path.value() << " " 266 << plugins[i].path.value() << " "
267 << error; 267 << error;
268
268 (void)library; // Prevent release-mode warning. 269 (void)library; // Prevent release-mode warning.
269 } 270 }
270 } 271 }
271 } 272 }
272 #endif 273 #endif
273 274
274 // This function triggers the static and lazy construction of objects that need 275 // This function triggers the static and lazy construction of objects that need
275 // to be created before imposing the sandbox. 276 // to be created before imposing the sandbox.
276 static void PreSandboxInit() { 277 static void PreSandboxInit() {
277 base::RandUint64(); 278 base::RandUint64();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 435 }
435 436
436 int sandbox_flags = linux_sandbox->GetStatus(); 437 int sandbox_flags = linux_sandbox->GetStatus();
437 438
438 Zygote zygote(sandbox_flags, forkdelegate); 439 Zygote zygote(sandbox_flags, forkdelegate);
439 // This function call can return multiple times, once per fork(). 440 // This function call can return multiple times, once per fork().
440 return zygote.ProcessRequests(); 441 return zygote.ProcessRequests();
441 } 442 }
442 443
443 } // namespace content 444 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698