Closed Bug 17732 Opened 25 years ago Closed 23 years ago

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

Categories

(Core Graveyard :: Plug-ins, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: blackconnect, Assigned: serhunt)

References

Details

(Keywords: crash, Whiteboard: Fixed on the trunk)

Attachments

(2 files)

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
*** Bug 17543 has been marked as a duplicate of this bug. ***
Shrirang is now QA owner for Plug-ins; QA assigning all of my Plug-ins bugs over
to him.
Status: NEW → ASSIGNED
Target Milestone: M14
Target Milestone: M14 → M15
Target Milestone: M15 → M16
Target Milestone: M16 → M17
Future.
Target Milestone: M17 → Future
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 → ---
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+
Keywords: crash
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 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+
Checked in to the trunk.
Whiteboard: Fixed on the trunk
marking edt0.9.4+
Keywords: edt0.9.4edt0.9.4+
In the branch now.
Keywords: fixed0.9.4
Resolution --> FIXED
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
marking verified.
Status: RESOLVED → VERIFIED
Keywords: verified0.9.4
Keywords: fixed0.9.4
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: