diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 03:47:58 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 03:47:58 +0000 |
commit | 96fe50e3c30274d1ccb23704c9318857631c549d (patch) | |
tree | 662fe5d886c4b6a8076f202ab6b072d0d3b9c5f2 /ppapi/proxy/ppb_flash_proxy.cc | |
parent | 8ceca680b845dec367abe35dcaa9babf9730fd15 (diff) | |
download | chromium_src-96fe50e3c30274d1ccb23704c9318857631c549d.zip chromium_src-96fe50e3c30274d1ccb23704c9318857631c549d.tar.gz chromium_src-96fe50e3c30274d1ccb23704c9318857631c549d.tar.bz2 |
Keep a reference to the module when handling PPB_Flash::Navigate
This is needed because Navigate can end up destroying the last instance, but the
dispatcher is still needed to send the reply.
This also cleans up a typo in a safeguard, and an incorrect assumption.
BUG=chromium-os:15044
TEST=http://nmd.mcd06514.orl.wayport.net/index.adp?MacAddr=48%3a5D%3a60%3a77%3a53%3a2A&IpAddr=192%2e168%2e6%2e84&vsgpId=&vsgId=60982&UserAgent=&ProxyHost=
Review URL: http://codereview.chromium.org/6999006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_flash_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppb_flash_proxy.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc index 27c83ba..c430b05 100644 --- a/ppapi/proxy/ppb_flash_proxy.cc +++ b/ppapi/proxy/ppb_flash_proxy.cc @@ -196,6 +196,11 @@ const InterfaceProxy::Info* PPB_Flash_Proxy::GetInfo() { } bool PPB_Flash_Proxy::OnMessageReceived(const IPC::Message& msg) { + // Prevent the dispatcher from going away during a call to Navigate. + // This must happen OUTSIDE of OnMsgNavigate since the handling code use + // the dispatcher upon return of the function (sending the reply message). + ScopedModuleReference death_grip(dispatcher()); + bool handled = true; IPC_BEGIN_MESSAGE_MAP(PPB_Flash_Proxy, msg) IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlash_SetInstanceAlwaysOnTop, |