| OLD | NEW |
| 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 "ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h" | 5 #include "ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "native_client/src/include/checked_cast.h" | 10 #include "native_client/src/include/checked_cast.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 // will have been destroyed. This will result in the cancellation of | 246 // will have been destroyed. This will result in the cancellation of |
| 247 // translation_complete_callback_, so no notification will be delivered. | 247 // translation_complete_callback_, so no notification will be delivered. |
| 248 if (translate_thread_.get() != NULL) { | 248 if (translate_thread_.get() != NULL) { |
| 249 translate_thread_->AbortSubprocesses(); | 249 translate_thread_->AbortSubprocesses(); |
| 250 } | 250 } |
| 251 if (!translation_finished_reported_) { | 251 if (!translation_finished_reported_) { |
| 252 plugin_->nacl_interface()->ReportTranslationFinished( | 252 plugin_->nacl_interface()->ReportTranslationFinished( |
| 253 plugin_->pp_instance(), | 253 plugin_->pp_instance(), |
| 254 PP_FALSE); | 254 PP_FALSE); |
| 255 } | 255 } |
| 256 // Force deleting the translate_thread now. It must be deleted |
| 257 // before any scoped_* fields hanging off of PnaclCoordinator |
| 258 // since the thread may be accessing those fields. |
| 259 // It will also be accessing obj_files_. |
| 260 translate_thread_.reset(NULL); |
| 261 // TODO(jvoung): use base/memory/scoped_vector.h to hold obj_files_. |
| 256 for (int i = 0; i < num_object_files_opened_; i++) { | 262 for (int i = 0; i < num_object_files_opened_; i++) { |
| 257 delete obj_files_[i]; | 263 delete obj_files_[i]; |
| 258 } | 264 } |
| 259 } | 265 } |
| 260 | 266 |
| 261 nacl::DescWrapper* PnaclCoordinator::ReleaseTranslatedFD() { | 267 nacl::DescWrapper* PnaclCoordinator::ReleaseTranslatedFD() { |
| 262 DCHECK(temp_nexe_file_ != NULL); | 268 DCHECK(temp_nexe_file_ != NULL); |
| 263 return temp_nexe_file_->release_read_wrapper(); | 269 return temp_nexe_file_->release_read_wrapper(); |
| 264 } | 270 } |
| 265 | 271 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 temp_nexe_file_.get(), | 688 temp_nexe_file_.get(), |
| 683 invalid_desc_wrapper_.get(), | 689 invalid_desc_wrapper_.get(), |
| 684 &error_info_, | 690 &error_info_, |
| 685 resources_.get(), | 691 resources_.get(), |
| 686 &pnacl_options_, | 692 &pnacl_options_, |
| 687 this, | 693 this, |
| 688 plugin_); | 694 plugin_); |
| 689 } | 695 } |
| 690 | 696 |
| 691 } // namespace plugin | 697 } // namespace plugin |
| OLD | NEW |