Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1700)

Unified Diff: ppapi/proxy/ppp_video_decoder_proxy.cc

Issue 14772034: Merge 198958 "PPAPI: Check for NULL dispatcher in PPP_VideoDecoder" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppp_video_decoder_proxy.cc
===================================================================
--- ppapi/proxy/ppp_video_decoder_proxy.cc (revision 200017)
+++ ppapi/proxy/ppp_video_decoder_proxy.cc (working copy)
@@ -59,9 +59,15 @@
HostResource decoder_resource;
decoder_resource.SetHostResource(instance, decoder);
- HostDispatcher::GetForInstance(instance)->Send(
+ // It's possible that the error we're being notified about is happening
+ // because the instance is shutting down. In this case, our instance may
+ // already have been removed from the HostDispatcher map.
+ HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
+ if (dispatcher) {
+ dispatcher->Send(
new PpapiMsg_PPPVideoDecoder_NotifyError(
API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, error));
+ }
}
static const PPP_VideoDecoder_Dev video_decoder_interface = {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698