diff options
-rw-r--r-- | chromium/ppapi/host/ppapi_host.cc | 11 | ||||
-rw-r--r-- | chromium/ppapi/host/ppapi_host.h | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/chromium/ppapi/host/ppapi_host.cc b/chromium/ppapi/host/ppapi_host.cc index 8c1a719b6f4..6d1970275c6 100644 --- a/chromium/ppapi/host/ppapi_host.cc +++ b/chromium/ppapi/host/ppapi_host.cc @@ -241,9 +241,10 @@ void PpapiHost::OnHostMsgResourceCreated( #ifndef TOOLKIT_QT NOTREACHED(); #else - LOG(INFO) << "Failed to create PPAPI resource host" - << IPC_MESSAGE_ID_CLASS(nested_msg.type()) + LOG(INFO) << "Failed to create PPAPI resource host, class:" + << IPC_MESSAGE_ID_CLASS(nested_msg.type()) << ", line:" << IPC_MESSAGE_ID_LINE(nested_msg.type()); + uninitialized_resources_.insert(params.pp_resource()); #endif return; } @@ -271,7 +272,11 @@ void PpapiHost::OnHostMsgAttachToPendingHost(PP_Resource pp_resource, void PpapiHost::OnHostMsgResourceDestroyed(PP_Resource resource) { ResourceMap::iterator found = resources_.find(resource); if (found == resources_.end()) { - NOTREACHED(); +#if defined(TOOLKIT_QT) + auto found_uninitialized = uninitialized_resources_.find(resource); + if (found_uninitialized == uninitialized_resources_.end()) +#endif + NOTREACHED(); return; } // Invoking the HostResource destructor might result in looking up the diff --git a/chromium/ppapi/host/ppapi_host.h b/chromium/ppapi/host/ppapi_host.h index f806b46a201..d1d9865b692 100644 --- a/chromium/ppapi/host/ppapi_host.h +++ b/chromium/ppapi/host/ppapi_host.h @@ -8,6 +8,7 @@ #include <map> #include <memory> #include <vector> +#include <set> #include "base/compiler_specific.h" #include "base/macros.h" @@ -141,6 +142,8 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener { PendingHostResourceMap pending_resource_hosts_; int next_pending_resource_host_id_; + std::set<PP_Resource> uninitialized_resources_; + DISALLOW_COPY_AND_ASSIGN(PpapiHost); }; |