As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 758227 - NPAPI plugin stream decomtamination: nsIPluginStreamInfo
: NPAPI plugin stream decomtamination: nsIPluginStreamInfo
Product: Core
Classification: Components
Component: Plug-ins (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Josh Aas
: Benjamin Smedberg [:bsmedberg]
Depends on: 758224
  Show dependency treegraph
Reported: 2012-05-24 08:14 PDT by Josh Aas
Modified: 2012-06-06 08:47 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

fix v1.0 (30.95 KB, patch)
2012-05-24 08:14 PDT, Josh Aas
benjamin: review+
Details | Diff | Splinter Review
fix v1.1 (30.87 KB, patch)
2012-06-04 09:05 PDT, Josh Aas
no flags Details | Diff | Splinter Review

Description User image Josh Aas 2012-05-24 08:14:40 PDT
Created attachment 626814 [details] [diff] [review]
fix v1.0

nsIPluginStreamInfo is unnecessary and its implementation contributes quite a bit to the complexity of our stream handling.

This patch depends on the fix in bug 758224 - without it this patch will cause a double-free crash.
Comment 1 User image Benjamin Smedberg [:bsmedberg] 2012-06-04 07:07:34 PDT
Comment on attachment 626814 [details] [diff] [review]
fix v1.0

>diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp

>-  nsPluginStreamListenerPeer* peer = listener->GetStreamListenerPeer();
>-  if (!peer)
>+  nsIStreamListener* streamListener = static_cast<nsIStreamListener*>(listener->GetStreamListenerPeer());
>+  if (!streamListener) {

Why is the static_cast necessary? It looks like it should be an automatic downcast and is a bit confusing. Please remove.

>-  *aRetainedPeer = (nsISupports*) peer;
>+  }
>+  *aRetainedPeer = static_cast<nsISupports*>(streamListener);

Also unnecessary here.
Comment 2 User image Josh Aas 2012-06-04 09:05:46 PDT
Created attachment 629795 [details] [diff] [review]
fix v1.1

Try server run:
Comment 3 User image Josh Aas 2012-06-04 13:34:35 PDT
Problems with Android try server runs, here is an Android-only retry:
Comment 4 User image Josh Aas 2012-06-05 06:59:42 PDT
pushed to mozilla-inbound:
Comment 5 User image Ed Morley [:emorley] 2012-06-06 08:47:12 PDT

Note You need to log in before you can comment on or make changes to this bug.