Bug 1352575 (part 7) - Remove AsyncNPP_NewStream. r=jimm.

--HG--
extra : rebase_source : 6b1010d7e6dd0bc75576ac21fbbc6f59848b2dcc
This commit is contained in:
Nicholas Nethercote 2017-04-18 16:56:43 +10:00
Родитель b3ddc9836a
Коммит 19f1b19c1d
3 изменённых файлов: 0 добавлений и 55 удалений

Просмотреть файл

@ -293,9 +293,6 @@ child:
returns (NPError rv,
uint16_t stype);
// Implements the async plugin init version of NPP_NewStream.
async AsyncNPP_NewStream(PBrowserStream actor, nsCString mimeType, bool seekable);
parent:
/* NPN_NewStream */
intr PPluginStream(nsCString mimeType,

Просмотреть файл

@ -2508,52 +2508,6 @@ PluginInstanceChild::AnswerNPP_NewStream(PBrowserStreamChild* actor,
return IPC_OK();
}
class NewStreamAsyncCall : public ChildAsyncCall
{
public:
NewStreamAsyncCall(PluginInstanceChild* aInstance,
BrowserStreamChild* aBrowserStreamChild,
const nsCString& aMimeType,
const bool aSeekable)
: ChildAsyncCall(aInstance, nullptr, nullptr)
, mBrowserStreamChild(aBrowserStreamChild)
, mMimeType(aMimeType)
, mSeekable(aSeekable)
{
}
NS_IMETHOD Run() override
{
RemoveFromAsyncList();
uint16_t stype = NP_NORMAL;
NPError rv = mInstance->DoNPP_NewStream(mBrowserStreamChild, mMimeType,
mSeekable, &stype);
DebugOnly<bool> sendOk =
mBrowserStreamChild->SendAsyncNPP_NewStreamResult(rv, stype);
MOZ_ASSERT(sendOk);
return NS_OK;
}
private:
BrowserStreamChild* mBrowserStreamChild;
const nsCString mMimeType;
const bool mSeekable;
};
mozilla::ipc::IPCResult
PluginInstanceChild::RecvAsyncNPP_NewStream(PBrowserStreamChild* actor,
const nsCString& mimeType,
const bool& seekable)
{
// Reusing ChildAsyncCall so that the task is cancelled properly on Destroy
BrowserStreamChild* child = static_cast<BrowserStreamChild*>(actor);
RefPtr<NewStreamAsyncCall> task =
new NewStreamAsyncCall(this, child, mimeType, seekable);
PostChildAsyncCall(task.forget());
return IPC_OK();
}
PBrowserStreamChild*
PluginInstanceChild::AllocPBrowserStreamChild(const nsCString& url,
const uint32_t& length,

Просмотреть файл

@ -165,12 +165,6 @@ protected:
NPError* rv,
uint16_t* stype) override;
virtual mozilla::ipc::IPCResult
RecvAsyncNPP_NewStream(
PBrowserStreamChild* actor,
const nsCString& mimeType,
const bool& seekable) override;
virtual PBrowserStreamChild*
AllocPBrowserStreamChild(const nsCString& url,
const uint32_t& length,