Index: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
index 64dfdda520a0b69885aab44c6d90b0b767d5e12e..bdef46e78ecec8200cf86a5e1c6a6ab6bf787993 100644 |
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
@@ -253,6 +253,12 @@ PnaclCoordinator::~PnaclCoordinator() { |
plugin_->pp_instance(), |
PP_FALSE); |
} |
+ // Force deleting the translate_thread now. It must be deleted |
+ // before any scoped_* fields hanging off of PnaclCoordinator |
+ // since the thread may be accessing those fields. |
+ // It will also be accessing obj_files_. |
+ translate_thread_.reset(NULL); |
+ // TODO(jvoung): use base/memory/scoped_vector.h to hold obj_files_. |
for (int i = 0; i < num_object_files_opened_; i++) { |
delete obj_files_[i]; |
} |