NPAPI plugin stream decomtamination: nsIPluginStreamInfo

RESOLVED FIXED in mozilla16

Status

()

Core
Plug-ins
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Josh Aas, Assigned: Josh Aas)

Tracking

Trunk
mozilla16
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

30.87 KB, patch
Details | Diff | Splinter Review
(Assignee)

Description

5 years ago
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.
Attachment #626814 - Flags: review?(benjamin)
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) {
>     return NPERR_GENERIC_ERROR;

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.
Attachment #626814 - Flags: review?(benjamin) → review+
(Assignee)

Comment 2

5 years ago
Created attachment 629795 [details] [diff] [review]
fix v1.1

Try server run:

https://tbpl.mozilla.org/?tree=Try&rev=1a64bb0c5665
Attachment #626814 - Attachment is obsolete: true
(Assignee)

Comment 3

5 years ago
Problems with Android try server runs, here is an Android-only retry:

https://tbpl.mozilla.org/?tree=Try&rev=49f978ba6959
(Assignee)

Comment 4

5 years ago
pushed to mozilla-inbound:

http://hg.mozilla.org/integration/mozilla-inbound/rev/8dd2e853993e

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/8dd2e853993e
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.