mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 522796 - Implement NPN_SetException for remote plugins, r=bsmedberg
This commit is contained in:
parent
885af129ba
commit
26eb897786
@ -39,6 +39,7 @@
|
||||
|
||||
include protocol PPluginIdentifier;
|
||||
include protocol PPluginInstance;
|
||||
include protocol PPluginScriptableObject;
|
||||
|
||||
include "npapi.h";
|
||||
include "mozilla/plugins/PluginMessageUtils.h";
|
||||
@ -153,6 +154,9 @@ parent:
|
||||
async PushCursor(NSCursorInfo cursorInfo);
|
||||
async PopCursor();
|
||||
sync GetNativeCursorsSupported() returns (bool supported);
|
||||
|
||||
sync NPN_SetException(nullable PPluginScriptableObject actor,
|
||||
nsCString message);
|
||||
};
|
||||
|
||||
} // namespace plugins
|
||||
|
@ -1516,7 +1516,19 @@ _setexception(NPObject* aNPObj,
|
||||
{
|
||||
PLUGIN_LOG_DEBUG_FUNCTION;
|
||||
ENSURE_PLUGIN_THREAD_VOID();
|
||||
NS_WARNING("Not yet implemented!");
|
||||
|
||||
PluginModuleChild* self = PluginModuleChild::current();
|
||||
PluginScriptableObjectChild* actor = NULL;
|
||||
if (aNPObj) {
|
||||
actor = self->GetActorForNPObject(aNPObj);
|
||||
if (!actor) {
|
||||
NS_ERROR("Failed to get actor!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
self->SendNPN_SetException(static_cast<PPluginScriptableObjectChild*>(actor),
|
||||
NullableString(aMessage));
|
||||
}
|
||||
|
||||
void NP_CALLBACK
|
||||
|
@ -1209,3 +1209,21 @@ PluginModuleParent::RemoveFromRefreshTimer(PluginInstanceParent *aInstance) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
PluginModuleParent::RecvNPN_SetException(PPluginScriptableObjectParent* aActor,
|
||||
const nsCString& aMessage)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
|
||||
NPObject* aNPObj = NULL;
|
||||
if (aActor) {
|
||||
aNPObj = static_cast<PluginScriptableObjectParent*>(aActor)->GetObject(true);
|
||||
if (!aNPObj) {
|
||||
NS_ERROR("Failed to get object!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
mozilla::plugins::parent::_setexception(aNPObj, NullableStringGet(aMessage));
|
||||
return true;
|
||||
}
|
||||
|
@ -210,6 +210,10 @@ protected:
|
||||
NS_OVERRIDE virtual bool
|
||||
RecvGetNativeCursorsSupported(bool* supported);
|
||||
|
||||
NS_OVERRIDE virtual bool
|
||||
RecvNPN_SetException(PPluginScriptableObjectParent* aActor,
|
||||
const nsCString& aMessage);
|
||||
|
||||
static PluginInstanceParent* InstCast(NPP instance);
|
||||
static BrowserStreamParent* StreamCast(NPP instance, NPStream* s);
|
||||
|
||||
|
@ -102,10 +102,10 @@ _MOCHITEST_FILES = \
|
||||
test_clear_site_data.html \
|
||||
test_zero_opacity.html \
|
||||
test_NPPVpluginWantsAllNetworkStreams.html \
|
||||
test_npruntime_npnsetexception.html \
|
||||
$(NULL)
|
||||
|
||||
# test_plugin_scroll_painting.html \ bug 596491
|
||||
# test_npruntime_npnsetexception.html \ Disabled for e10s
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
_MOCHITEST_FILES += \
|
||||
|
Loading…
Reference in New Issue
Block a user