diff --git a/dom/plugins/ipc/BrowserStreamChild.cpp b/dom/plugins/ipc/BrowserStreamChild.cpp index 1a2acf6b74b6..b6428b994021 100644 --- a/dom/plugins/ipc/BrowserStreamChild.cpp +++ b/dom/plugins/ipc/BrowserStreamChild.cpp @@ -177,16 +177,6 @@ BrowserStreamChild::NPN_RequestRead(NPByteRange* aRangeList) return result; } -void -BrowserStreamChild::NPN_DestroyStream(NPReason reason) -{ - mStreamStatus = reason; - if (ALIVE == mState) - SendNPN_DestroyStream(reason); - - EnsureDeliveryPending(); -} - void BrowserStreamChild::EnsureDeliveryPending() { @@ -275,7 +265,10 @@ BrowserStreamChild::DeliverPendingData() if (0 == r) return true; if (r < 0) { // error condition - NPN_DestroyStream(NPRES_NETWORK_ERR); + mStreamStatus = NPRES_NETWORK_ERR; + + // Set up stream destruction + EnsureDeliveryPending(); return false; } mPendingData[0].curpos += r; diff --git a/dom/plugins/ipc/BrowserStreamChild.h b/dom/plugins/ipc/BrowserStreamChild.h index f1916320c844..33ec05555302 100644 --- a/dom/plugins/ipc/BrowserStreamChild.h +++ b/dom/plugins/ipc/BrowserStreamChild.h @@ -54,7 +54,6 @@ public: } NPError NPN_RequestRead(NPByteRange* aRangeList); - void NPN_DestroyStream(NPReason reason); void NotifyPending() { NS_ASSERTION(!mNotifyPending, "Pending twice?"); @@ -85,7 +84,6 @@ public: private: friend class StreamNotifyChild; - using PBrowserStreamChild::SendNPN_DestroyStream; /** * Post an event to ensure delivery of pending data/destroy/urlnotify events @@ -116,7 +114,7 @@ private: /** * The plugin's notion of whether a stream has been "closed" (no more * data delivery) differs from the plugin host due to asynchronous delivery - * of data and NPN_DestroyStream. While the plugin-visible stream is open, + * of data and stream destruction. While the plugin-visible stream is open, * mStreamStatus should be kStreamOpen (-1). mStreamStatus will be a * failure code if either the parent or child indicates stream failure. */ diff --git a/dom/plugins/ipc/BrowserStreamParent.cpp b/dom/plugins/ipc/BrowserStreamParent.cpp index 8f0265112487..f17c691b243a 100644 --- a/dom/plugins/ipc/BrowserStreamParent.cpp +++ b/dom/plugins/ipc/BrowserStreamParent.cpp @@ -85,25 +85,6 @@ BrowserStreamParent::AnswerNPN_RequestRead(const IPCByteRanges& ranges, return IPC_OK(); } -mozilla::ipc::IPCResult -BrowserStreamParent::RecvNPN_DestroyStream(const NPReason& reason) -{ - switch (mState) { - case ALIVE: - break; - - case DYING: - return IPC_OK(); - - default: - NS_ERROR("Unexpected state"); - return IPC_FAIL_NO_REASON(this); - } - - mNPP->mNPNIface->destroystream(mNPP->mNPP, mStream, reason); - return IPC_OK(); -} - void BrowserStreamParent::NPP_DestroyStream(NPReason reason) { diff --git a/dom/plugins/ipc/BrowserStreamParent.h b/dom/plugins/ipc/BrowserStreamParent.h index 141d8ac4dd62..435f98237434 100644 --- a/dom/plugins/ipc/BrowserStreamParent.h +++ b/dom/plugins/ipc/BrowserStreamParent.h @@ -33,8 +33,6 @@ public: virtual mozilla::ipc::IPCResult AnswerNPN_RequestRead(const IPCByteRanges& ranges, NPError* result) override; - virtual mozilla::ipc::IPCResult RecvNPN_DestroyStream(const NPReason& reason) override; - virtual mozilla::ipc::IPCResult RecvStreamDestroyed() override; int32_t WriteReady(); diff --git a/dom/plugins/ipc/PBrowserStream.ipdl b/dom/plugins/ipc/PBrowserStream.ipdl index 8f5beedc522f..c4623a961d75 100644 --- a/dom/plugins/ipc/PBrowserStream.ipdl +++ b/dom/plugins/ipc/PBrowserStream.ipdl @@ -38,7 +38,6 @@ child: parent: intr NPN_RequestRead(IPCByteRanges ranges) returns (NPError result); - async NPN_DestroyStream(NPReason reason); async StreamDestroyed(); /*