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

Unified Diff: components/nacl/renderer/plugin/pnacl_translate_thread.cc

Issue 1137833003: Attempt to fix a CloseHandle crasher in the renderer process. The crash is triggered by Nacl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted changes to ppb_nacl_private_impl.cc Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/renderer/plugin/plugin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/plugin/pnacl_translate_thread.cc
diff --git a/components/nacl/renderer/plugin/pnacl_translate_thread.cc b/components/nacl/renderer/plugin/pnacl_translate_thread.cc
index 9395acd05caca391e4d7d1aee24f058691d5f434..67701215df903aeccba0af8932a2fb64a99c49f5 100644
--- a/components/nacl/renderer/plugin/pnacl_translate_thread.cc
+++ b/components/nacl/renderer/plugin/pnacl_translate_thread.cc
@@ -178,14 +178,12 @@ void PnaclTranslateThread::DoTranslate() {
PnaclResources::ResourceType compiler_type = pnacl_options_->use_subzero
? PnaclResources::SUBZERO
: PnaclResources::LLC;
- // On success, ownership of file_info is transferred.
+ // Ownership of file_info is transferred here.
PP_NaClFileInfo file_info = resources_->TakeFileInfo(compiler_type);
const std::string& url = resources_->GetUrl(compiler_type);
NaClSubprocess* compiler_subprocess =
plugin_->LoadHelperNaClModule(url, file_info, &error_info);
if (compiler_subprocess == NULL) {
- if (file_info.handle != PP_kInvalidFileHandle)
- CloseFileHandle(file_info.handle);
TranslateFailed(PP_NACL_ERROR_PNACL_LLC_SETUP,
"Compile process could not be created: " +
error_info.message());
@@ -352,12 +350,10 @@ bool PnaclTranslateThread::RunLdSubprocess() {
nacl::DescWrapper* ld_out_file = nexe_file_->write_wrapper();
int64_t ld_start_time = NaClGetTimeOfDayMicroseconds();
PP_NaClFileInfo ld_file_info = resources_->TakeFileInfo(PnaclResources::LD);
- // On success, ownership of ld_file_info is transferred.
+ // Ownership of ld_file_info is transferred here.
nacl::scoped_ptr<NaClSubprocess> ld_subprocess(plugin_->LoadHelperNaClModule(
resources_->GetUrl(PnaclResources::LD), ld_file_info, &error_info));
if (ld_subprocess.get() == NULL) {
- if (ld_file_info.handle != PP_kInvalidFileHandle)
- CloseFileHandle(ld_file_info.handle);
TranslateFailed(PP_NACL_ERROR_PNACL_LD_SETUP,
"Link process could not be created: " +
error_info.message());
« no previous file with comments | « components/nacl/renderer/plugin/plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698