зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1352559 followup (part 4) - remove remaining references to NPN_DestroyStream called by internal code on stream teardown, r=qdot
MozReview-Commit-ID: ErBzhf2yDN9 --HG-- extra : rebase_source : 40d639f9565e8dbbf9705afa3bfdfbcc850c6d4d extra : amend_source : f06924b2bcb0bdb00aafea09be00509e08235373
This commit is contained in:
Родитель
de45c53ef7
Коммит
3f04a71bfa
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -38,7 +38,6 @@ child:
|
|||
parent:
|
||||
intr NPN_RequestRead(IPCByteRanges ranges)
|
||||
returns (NPError result);
|
||||
async NPN_DestroyStream(NPReason reason);
|
||||
async StreamDestroyed();
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче