本文整理汇总了C++中PluginAsyncSurrogate::DestroyAsyncStream方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginAsyncSurrogate::DestroyAsyncStream方法的具体用法?C++ PluginAsyncSurrogate::DestroyAsyncStream怎么用?C++ PluginAsyncSurrogate::DestroyAsyncStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginAsyncSurrogate
的用法示例。
在下文中一共展示了PluginAsyncSurrogate::DestroyAsyncStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IPC_OK
mozilla::ipc::IPCResult
BrowserStreamParent::RecvAsyncNPP_NewStreamResult(const NPError& rv,
const uint16_t& stype)
{
PLUGIN_LOG_DEBUG_FUNCTION;
PluginAsyncSurrogate* surrogate = mNPP->GetAsyncSurrogate();
MOZ_ASSERT(surrogate);
surrogate->AsyncCallArriving();
if (mState == DEFERRING_DESTROY) {
// We've been asked to destroy ourselves before init was complete.
mState = DYING;
Unused << SendNPP_DestroyStream(mDeferredDestroyReason);
return IPC_OK();
}
NPError error = rv;
if (error == NPERR_NO_ERROR) {
if (!mStreamListener) {
return IPC_FAIL_NO_REASON(this);
}
if (mStreamListener->SetStreamType(stype)) {
mState = ALIVE;
} else {
error = NPERR_GENERIC_ERROR;
}
}
if (error != NPERR_NO_ERROR) {
surrogate->DestroyAsyncStream(mStream);
Unused << PBrowserStreamParent::Send__delete__(this);
}
return IPC_OK();
}