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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 218633011: Stop doing unnecessary initialization in non-SFI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 #ifdef _MSC_VER 5 #ifdef _MSC_VER
6 // Do not warn about use of std::copy with raw pointers. 6 // Do not warn about use of std::copy with raw pointers.
7 #pragma warning(disable : 4996) 7 #pragma warning(disable : 4996)
8 #endif 8 #endif
9 9
10 #include "ppapi/native_client/src/trusted/plugin/plugin.h" 10 #include "ppapi/native_client/src/trusted/plugin/plugin.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 bool enable_crash_throttling, 339 bool enable_crash_throttling,
340 const pp::CompletionCallback& init_done_cb, 340 const pp::CompletionCallback& init_done_cb,
341 const pp::CompletionCallback& crash_cb) { 341 const pp::CompletionCallback& crash_cb) {
342 nacl::scoped_ptr<nacl::DescWrapper> scoped_wrapper(wrapper); 342 nacl::scoped_ptr<nacl::DescWrapper> scoped_wrapper(wrapper);
343 CHECK(pp::Module::Get()->core()->IsMainThread()); 343 CHECK(pp::Module::Get()->core()->IsMainThread());
344 // Before forking a new sel_ldr process, ensure that we do not leak 344 // Before forking a new sel_ldr process, ensure that we do not leak
345 // the ServiceRuntime object for an existing subprocess, and that any 345 // the ServiceRuntime object for an existing subprocess, and that any
346 // associated listener threads do not go unjoined because if they 346 // associated listener threads do not go unjoined because if they
347 // outlive the Plugin object, they will not be memory safe. 347 // outlive the Plugin object, they will not be memory safe.
348 ShutDownSubprocesses(); 348 ShutDownSubprocesses();
349 const bool uses_irt = !uses_nonsfi_mode;
Mark Seaborn 2014/04/01 14:35:36 It might be slightly preferable to do this in nacl
hamaji 2014/04/03 07:05:54 Done.
349 SelLdrStartParams params(manifest_base_url(), 350 SelLdrStartParams params(manifest_base_url(),
350 true /* uses_irt */, 351 uses_irt,
351 true /* uses_ppapi */, 352 true /* uses_ppapi */,
352 uses_nonsfi_mode, 353 uses_nonsfi_mode,
353 enable_dev_interfaces_, 354 enable_dev_interfaces_,
354 enable_dyncode_syscalls, 355 enable_dyncode_syscalls,
355 enable_exception_handling, 356 enable_exception_handling,
356 enable_crash_throttling); 357 enable_crash_throttling);
357 ErrorInfo error_info; 358 ErrorInfo error_info;
358 ServiceRuntime* service_runtime = 359 ServiceRuntime* service_runtime =
359 new ServiceRuntime(this, manifest_.get(), true, uses_nonsfi_mode, 360 new ServiceRuntime(this, manifest_.get(), true, uses_nonsfi_mode,
360 init_done_cb, crash_cb); 361 init_done_cb, crash_cb);
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 DCHECK(pp::Module::Get()->core()->IsMainThread()); 1446 DCHECK(pp::Module::Get()->core()->IsMainThread());
1446 DCHECK(nacl_interface_); 1447 DCHECK(nacl_interface_);
1447 exit_status_ = exit_status; 1448 exit_status_ = exit_status;
1448 nacl_interface_->SetReadOnlyProperty(pp_instance(), 1449 nacl_interface_->SetReadOnlyProperty(pp_instance(),
1449 pp::Var("exitStatus").pp_var(), 1450 pp::Var("exitStatus").pp_var(),
1450 pp::Var(exit_status_).pp_var()); 1451 pp::Var(exit_status_).pp_var());
1451 } 1452 }
1452 1453
1453 1454
1454 } // namespace plugin 1455 } // namespace plugin
OLDNEW
« components/nacl/loader/nacl_listener.cc ('K') | « components/nacl/loader/nacl_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698