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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 #include "native_client/src/trusted/plugin/pnacl_translate_thread.h" 5 #include "native_client/src/trusted/plugin/pnacl_translate_thread.h"
6 6
7 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" 7 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
8 #include "native_client/src/trusted/plugin/plugin.h" 8 #include "native_client/src/trusted/plugin/plugin.h"
9 #include "native_client/src/trusted/plugin/plugin_error.h" 9 #include "native_client/src/trusted/plugin/plugin_error.h"
10 #include "native_client/src/trusted/plugin/pnacl_resources.h" 10 #include "native_client/src/trusted/plugin/pnacl_resources.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 core->CallOnMainThread( 217 core->CallOnMainThread(
218 0, 218 0,
219 coordinator_->GetCompileProgressCallback(data.size()), 219 coordinator_->GetCompileProgressCallback(data.size()),
220 PP_OK); 220 PP_OK);
221 } else { 221 } else {
222 NaClXMutexUnlock(&cond_mu_); 222 NaClXMutexUnlock(&cond_mu_);
223 } 223 }
224 } 224 }
225 PLUGIN_PRINTF(("PnaclTranslateThread done with chunks\n")); 225 PLUGIN_PRINTF(("PnaclTranslateThread done with chunks\n"));
226 // Finish llc. 226 // Finish llc.
227 if(!llc_subprocess_->InvokeSrpcMethod("StreamEnd", 227 if (!llc_subprocess_->InvokeSrpcMethod("StreamEnd", std::string(), &params)) {
228 "",
229 &params)) {
230 PLUGIN_PRINTF(("PnaclTranslateThread StreamEnd failed\n")); 228 PLUGIN_PRINTF(("PnaclTranslateThread StreamEnd failed\n"));
231 if (llc_subprocess_->srpc_client()->GetLastError() == 229 if (llc_subprocess_->srpc_client()->GetLastError() ==
232 NACL_SRPC_RESULT_APP_ERROR) { 230 NACL_SRPC_RESULT_APP_ERROR) {
233 // The error string is only present if the error was sent back from llc. 231 // The error string is only present if the error was sent back from llc.
234 TranslateFailed(ERROR_PNACL_LLC_INTERNAL, 232 TranslateFailed(ERROR_PNACL_LLC_INTERNAL,
235 params.outs()[3]->arrays.str); 233 params.outs()[3]->arrays.str);
236 } else { 234 } else {
237 TranslateFailed(ERROR_PNACL_LLC_INTERNAL, 235 TranslateFailed(ERROR_PNACL_LLC_INTERNAL,
238 "Compile StreamEnd internal error"); 236 "Compile StreamEnd internal error");
239 } 237 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 PLUGIN_PRINTF(("~PnaclTranslateThread (translate_thread=%p)\n", this)); 361 PLUGIN_PRINTF(("~PnaclTranslateThread (translate_thread=%p)\n", this));
364 AbortSubprocesses(); 362 AbortSubprocesses();
365 NaClThreadJoin(translate_thread_.get()); 363 NaClThreadJoin(translate_thread_.get());
366 PLUGIN_PRINTF(("~PnaclTranslateThread joined\n")); 364 PLUGIN_PRINTF(("~PnaclTranslateThread joined\n"));
367 NaClCondVarDtor(&buffer_cond_); 365 NaClCondVarDtor(&buffer_cond_);
368 NaClMutexDtor(&cond_mu_); 366 NaClMutexDtor(&cond_mu_);
369 NaClMutexDtor(&subprocess_mu_); 367 NaClMutexDtor(&subprocess_mu_);
370 } 368 }
371 369
372 } // namespace plugin 370 } // namespace plugin
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin_error.h ('k') | ppapi/native_client/src/trusted/plugin/service_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698