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

Unified Diff: webkit/plugins/ppapi/content_decryptor_delegate.cc

Issue 11477002: Fix in process PPAPI decryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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: webkit/plugins/ppapi/content_decryptor_delegate.cc
diff --git a/webkit/plugins/ppapi/content_decryptor_delegate.cc b/webkit/plugins/ppapi/content_decryptor_delegate.cc
index be79e12f3fa0cbcbe04897256a5c145d758f197b..db71162ae38e1d5b310401006d437beebab4d927 100644
--- a/webkit/plugins/ppapi/content_decryptor_delegate.cc
+++ b/webkit/plugins/ppapi/content_decryptor_delegate.cc
@@ -1004,6 +1004,10 @@ bool ContentDecryptorDelegate::MakeMediaBufferResource(
}
}
+ // Take an extra reference on the resource to ensure that the reference count
+ // does not reach zero when the PPAPI glue releases its reference.
+ PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(media_resource);
dmichael (off chromium) 2012/12/06 19:30:09 If you need an extra reference, then don't use the
Tom Finegan 2012/12/06 22:59:02 I'm trying to make an optimization work: The decry
+
EnterResourceNoLock<PPB_Buffer_API> enter(media_resource, true);
if (enter.failed()) {
media_resource.Release();
« 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