stream (result of peer's NewStream method) isn't working

VERIFIED FIXED

Status

()

Core
Plug-ins
P3
normal
VERIFIED FIXED
18 years ago
14 years ago

People

(Reporter: Igor Kushnirskiy, Assigned: av (gone))

Tracking

({crash})

Trunk
x86
Windows NT
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: Fixed on the trunk)

Attachments

(2 attachments)

(Reporter)

Description

18 years ago
Overview Description:
When you try to write something to output stream, returned by
PluginInstancePeer::NewStream method, all written data will be lost and
empty result shown/saved.

Steps to reproduce:
1. Apply following patch to mozilla/modules/plugin/test/npsimple.cpp
--
Index: npsimple.cpp
===================================================================
RCS file: /cvsroot/mozilla/modules/plugin/test/npsimple.cpp,v
retrieving revision 1.13
diff -r1.13 npsimple.cpp
44,46c44,46
< #include <gdk/gdk.h>
< #include <gdk/gdkprivate.h>
< #include <gtk/gtk.h>
---
> //#include <gdk/gdk.h>
> //#include <gdk/gdkprivate.h>
> //#include <gtk/gtk.h>
741a742,752
>     // { idk
>     nsIOutputStream *output = NULL;
>
>     if (!NS_FAILED(fPeer->NewStream("text/plain","_new",&output))) {
>         const char * buf = "Hello world";
>         nsresult r;
>         output->Write(buf,strlen(buf),&r);
>         output->Flush();
>         NS_RELEASE(output);
>     }
>     // } idk
829c840
<     if(listener != NULL)
---
>     if(listener != NULL) {
831c842,843
<
---
>         (*listener)->AddRef();
> 	}

--
2. Compile. Run mozilla and open SimpleTest.html

Actual Results:
Sent data will not be shown.

Expected result:

In new window "Hello world" should be shown
(Reporter)

Comment 1

18 years ago
*** Bug 17543 has been marked as a duplicate of this bug. ***

Comment 2

18 years ago
Shrirang is now QA owner for Plug-ins; QA assigning all of my Plug-ins bugs over
to him.
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M14
(Assignee)

Updated

18 years ago
Target Milestone: M14 → M15
(Assignee)

Updated

18 years ago
Target Milestone: M15 → M16
(Assignee)

Updated

18 years ago
Target Milestone: M16 → M17
Future.
Target Milestone: M17 → Future

Comment 4

16 years ago
nominating for mozilla1.0, this also effects the NPAPI, but causes a crash! See
the NPAPI tester plugin.

Anyone here have any idea why this is failing?
Keywords: 4xp, mozilla1.0
Target Milestone: Future → ---
(Assignee)

Comment 5

16 years ago
Created attachment 62952 [details] [diff] [review]
patch by peterlubczynski
(Assignee)

Comment 6

16 years ago
Created attachment 62968 [details] [diff] [review]
patch v.2 -- addresses crash on NPN_DestroyStream and making temp file with no extension so it is not always html

Comment 7

16 years ago
Comment on attachment 62968 [details] [diff] [review]
patch v.2 -- addresses crash on NPN_DestroyStream and making temp file with no extension so it is not always html

very nice! r=peterl
Attachment #62968 - Flags: review+
(Assignee)

Updated

16 years ago
Keywords: crash

Comment 8

16 years ago
nominating edt0.9.4 because of an important NPAPI compatibility issue and low risk:

1) This fixes NPN_Write
2) Correctly displays the output
3) Fixes CRASH due to bad cast in NPN_DestroyStream which wasn't seen because of #1
Keywords: edt0.9.4

Comment 9

16 years ago
Comment on attachment 62968 [details] [diff] [review]
patch v.2 -- addresses crash on NPN_DestroyStream and making temp file with no extension so it is not always html

sr=rpotts@netscape.com
Attachment #62968 - Flags: superreview+
(Assignee)

Comment 10

16 years ago
Checked in to the trunk.
Whiteboard: Fixed on the trunk

Comment 11

16 years ago
marking edt0.9.4+
Keywords: edt0.9.4 → edt0.9.4+
(Assignee)

Comment 12

16 years ago
In the branch now.
Keywords: fixed0.9.4
(Assignee)

Comment 13

16 years ago
Resolution --> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 14

16 years ago
marking verified.
Status: RESOLVED → VERIFIED

Updated

16 years ago
Keywords: verified0.9.4

Updated

14 years ago
Keywords: fixed0.9.4
You need to log in before you can comment on or make changes to this bug.