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

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

Issue 8929022: reduce log verbosity level (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clarify exit vs crash Created 9 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.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 /* 1 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" 7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime"
8 8
9 #include "native_client/src/trusted/plugin/service_runtime.h" 9 #include "native_client/src/trusted/plugin/service_runtime.h"
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 NaClLog(4, "PluginReverseInterface::DoPostMessage(%s)\n", message.c_str()); 114 NaClLog(4, "PluginReverseInterface::DoPostMessage(%s)\n", message.c_str());
115 plugin::WeakRefCallOnMainThread( 115 plugin::WeakRefCallOnMainThread(
116 anchor_, 116 anchor_,
117 0, /* delay in ms */ 117 0, /* delay in ms */
118 ALLOW_THIS_IN_INITIALIZER_LIST(this), 118 ALLOW_THIS_IN_INITIALIZER_LIST(this),
119 &plugin::PluginReverseInterface::PostMessage_MainThreadContinuation, 119 &plugin::PluginReverseInterface::PostMessage_MainThreadContinuation,
120 continuation); 120 continuation);
121 } 121 }
122 122
123 void PluginReverseInterface::StartupInitializationComplete() { 123 void PluginReverseInterface::StartupInitializationComplete() {
124 NaClLog(0, "PluginReverseInterface::StartupInitializationComplete\n"); 124 NaClLog(4, "PluginReverseInterface::StartupInitializationComplete\n");
125 if (init_done_cb_.pp_completion_callback().func != NULL) { 125 if (init_done_cb_.pp_completion_callback().func != NULL) {
126 NaClLog(0, 126 NaClLog(4,
127 "PluginReverseInterface::StartupInitializationComplete:" 127 "PluginReverseInterface::StartupInitializationComplete:"
128 " invoking CB\n"); 128 " invoking CB\n");
129 pp::Module::Get()->core()->CallOnMainThread(0, init_done_cb_, PP_OK); 129 pp::Module::Get()->core()->CallOnMainThread(0, init_done_cb_, PP_OK);
130 } else { 130 } else {
131 NaClLog(0, 131 NaClLog(1,
132 "PluginReverseInterface::StartupInitializationComplete:" 132 "PluginReverseInterface::StartupInitializationComplete:"
133 " init_done_cb_ not valid, skipping.\n"); 133 " init_done_cb_ not valid, skipping.\n");
134 } 134 }
135 } 135 }
136 136
137 void PluginReverseInterface::Log_MainThreadContinuation( 137 void PluginReverseInterface::Log_MainThreadContinuation(
138 LogToJavaScriptConsoleResource* p, 138 LogToJavaScriptConsoleResource* p,
139 int32_t err) { 139 int32_t err) {
140 UNREFERENCED_PARAMETER(err); 140 UNREFERENCED_PARAMETER(err);
141 NaClLog(4, 141 NaClLog(4,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // TODO(bsy): once the plugin has a reliable way to report that the 355 // TODO(bsy): once the plugin has a reliable way to report that the
356 // file usage is done -- and sel_ldr uses this RPC call -- we should 356 // file usage is done -- and sel_ldr uses this RPC call -- we should
357 // tell the plugin that the associated resources can be freed. 357 // tell the plugin that the associated resources can be freed.
358 *cls->op_result_ptr = true; 358 *cls->op_result_ptr = true;
359 *cls->op_complete_ptr = true; 359 *cls->op_complete_ptr = true;
360 NaClXCondVarBroadcast(&cv_); 360 NaClXCondVarBroadcast(&cv_);
361 // cls automatically deleted 361 // cls automatically deleted
362 } 362 }
363 363
364 void PluginReverseInterface::ReportCrash() { 364 void PluginReverseInterface::ReportCrash() {
365 NaClLog(0, "PluginReverseInterface::ReportCrash\n"); 365 NaClLog(4, "PluginReverseInterface::ReportCrash\n");
366 if (crash_cb_.pp_completion_callback().func != NULL) { 366 if (crash_cb_.pp_completion_callback().func != NULL) {
367 NaClLog(0, "PluginReverseInterface::ReportCrash: invoking CB\n"); 367 NaClLog(4, "PluginReverseInterface::ReportCrash: invoking CB\n");
368 pp::Module::Get()->core()->CallOnMainThread(0, crash_cb_, PP_OK); 368 pp::Module::Get()->core()->CallOnMainThread(0, crash_cb_, PP_OK);
369 } else { 369 } else {
370 NaClLog(0, 370 NaClLog(4,
sehr (please use chromium) 2011/12/15 01:37:51 change to match the above warning level.
bsy 2011/12/15 01:39:41 Done.
371 "PluginReverseInterface::ReportCrash:" 371 "PluginReverseInterface::ReportCrash:"
372 " crash_cb_ not valid, skipping\n"); 372 " crash_cb_ not valid, skipping\n");
373 } 373 }
374 } 374 }
375 375
376 void PluginReverseInterface::ReportExitStatus(int exit_status) { 376 void PluginReverseInterface::ReportExitStatus(int exit_status) {
377 service_runtime_->set_exit_status(exit_status); 377 service_runtime_->set_exit_status(exit_status);
378 } 378 }
379 379
380 ServiceRuntime::ServiceRuntime(Plugin* plugin, 380 ServiceRuntime::ServiceRuntime(Plugin* plugin,
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 nacl::MutexLocker take(&mu_); 612 nacl::MutexLocker take(&mu_);
613 return exit_status_; 613 return exit_status_;
614 } 614 }
615 615
616 void ServiceRuntime::set_exit_status(int exit_status) { 616 void ServiceRuntime::set_exit_status(int exit_status) {
617 nacl::MutexLocker take(&mu_); 617 nacl::MutexLocker take(&mu_);
618 exit_status_ = exit_status & 0xff; 618 exit_status_ = exit_status & 0xff;
619 } 619 }
620 620
621 } // namespace plugin 621 } // namespace plugin
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698