diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-22 21:56:00 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-22 21:56:00 +0000 |
commit | c3f678fc5f4eb5160b5c21ef1b35df0ec41bd625 (patch) | |
tree | e56738f86a62c4075981b8c3fd3ca854201ad60a /chrome | |
parent | 36f3812d41ed6736c5a69930f17b864f33df8297 (diff) | |
download | chromium_src-c3f678fc5f4eb5160b5c21ef1b35df0ec41bd625.zip chromium_src-c3f678fc5f4eb5160b5c21ef1b35df0ec41bd625.tar.gz chromium_src-c3f678fc5f4eb5160b5c21ef1b35df0ec41bd625.tar.bz2 |
Fix bugs in the broker that cause the browser to crash when trying to unload a NaCl module or to load another one.
Review URL: http://codereview.chromium.org/650088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/nacl_host/nacl_broker_service.cc | 7 | ||||
-rw-r--r-- | chrome/nacl/broker_thread.cc | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/nacl_host/nacl_broker_service.cc b/chrome/browser/nacl_host/nacl_broker_service.cc index 76da887..6a58c2f 100644 --- a/chrome/browser/nacl_host/nacl_broker_service.cc +++ b/chrome/browser/nacl_host/nacl_broker_service.cc @@ -39,11 +39,12 @@ bool NaClBrokerService::StartBroker() { bool NaClBrokerService::LaunchLoader(NaClProcessHost* nacl_process_host, const std::wstring& loader_channel_id) { + // Add task to the list + pending_launches_[loader_channel_id] = nacl_process_host; if (broker_started_) { + // If the broker is not ready yet + // we will call LaunchLoader in OnBrokerStarted broker_host_->LaunchLoader(loader_channel_id); - } else { - // Add task to the list - pending_launches_[loader_channel_id] = nacl_process_host; } return true; } diff --git a/chrome/nacl/broker_thread.cc b/chrome/nacl/broker_thread.cc index 0b4bbd2..832c73a7 100644 --- a/chrome/nacl/broker_thread.cc +++ b/chrome/nacl/broker_thread.cc @@ -57,7 +57,7 @@ void NaClBrokerThread::OnLaunchLoaderThroughBroker( if (loader_process) { DuplicateHandle(::GetCurrentProcess(), loader_process, browser_handle_, &loader_handle_in_browser, - PROCESS_DUP_HANDLE, FALSE, 0); + PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION , FALSE, 0); } } Send(new NaClProcessMsg_LoaderLaunched(loader_channel_id, |