Fix Bug 657588. r=bsmedberg a=dveditz
authorKyle Huey <khuey@kylehuey.com>
Mon, 27 Feb 2012 12:38:02 -0800
changeset 35273 9b893007fa4ef23fb90301193122a9ed6ea55877
parent 35272 57f74ecff4839969caf5d1488f71c015a29eef15
child 35274 2b31786f3b3e9bce8050b91c7f4d8d9f98937e46
push id2028
push userkhuey@mozilla.com
push dateMon, 27 Feb 2012 20:38:23 +0000
reviewersbsmedberg, dveditz
bugs657588
milestone1.9.2.28pre
Fix Bug 657588. r=bsmedberg a=dveditz
dom/plugins/PluginInstanceParent.cpp
--- a/dom/plugins/PluginInstanceParent.cpp
+++ b/dom/plugins/PluginInstanceParent.cpp
@@ -357,17 +357,22 @@ PluginInstanceParent::AnswerPStreamNotif
         *result = mNPNIface->posturlnotify(mNPP,
                                            NullableStringGet(url),
                                            NullableStringGet(target),
                                            buffer.Length(),
                                            NullableStringGet(buffer),
                                            file, actor);
     }
 
-    if (!streamDestroyed) {
+    if (streamDestroyed) {
+        // If the stream was destroyed, we must return an error code in the
+        // constructor.
+        *result = NPERR_GENERIC_ERROR;
+    }
+    else {
         static_cast<StreamNotifyParent*>(actor)->ClearDestructionFlag();
         if (*result != NPERR_NO_ERROR)
             PStreamNotifyParent::Send__delete__(actor, NPERR_GENERIC_ERROR);
     }
 
     return true;
 }