Backed out changeset 49be7aaa199c (bug 1449736) for mochitest failure at layout/generic/test/test_plugin_focus.html on a CLOSED TREE

This commit is contained in:
Daniel Varga 2019-01-10 22:56:40 +02:00
parent 1a75356195
commit 10fe290de6

View File

@ -268,14 +268,14 @@ int PluginInstanceChild::GetQuirks() {
NPError PluginInstanceChild::InternalGetNPObjectForValue(NPNVariable aValue, NPError PluginInstanceChild::InternalGetNPObjectForValue(NPNVariable aValue,
NPObject** aObject) { NPObject** aObject) {
PluginScriptableObjectChild* actor = nullptr; PluginScriptableObjectChild* actor = nullptr;
NPError result = NPERR_GENERIC_ERROR; NPError result = NPERR_NO_ERROR;
switch (aValue) { switch (aValue) {
case NPNVWindowNPObject: case NPNVWindowNPObject:
if (!(actor = mCachedWindowActor)) { if (!(actor = mCachedWindowActor)) {
PPluginScriptableObjectChild* actorProtocol; PPluginScriptableObjectChild* actorProtocol;
if (CallNPN_GetValue_NPNVWindowNPObject(&actorProtocol, &result) && CallNPN_GetValue_NPNVWindowNPObject(&actorProtocol, &result);
(result == NPERR_NO_ERROR)) { if (result == NPERR_NO_ERROR) {
actor = mCachedWindowActor = actor = mCachedWindowActor =
static_cast<PluginScriptableObjectChild*>(actorProtocol); static_cast<PluginScriptableObjectChild*>(actorProtocol);
NS_ASSERTION(actor, "Null actor!"); NS_ASSERTION(actor, "Null actor!");
@ -288,8 +288,8 @@ NPError PluginInstanceChild::InternalGetNPObjectForValue(NPNVariable aValue,
case NPNVPluginElementNPObject: case NPNVPluginElementNPObject:
if (!(actor = mCachedElementActor)) { if (!(actor = mCachedElementActor)) {
PPluginScriptableObjectChild* actorProtocol; PPluginScriptableObjectChild* actorProtocol;
if (CallNPN_GetValue_NPNVPluginElementNPObject(&actorProtocol, &result) && CallNPN_GetValue_NPNVPluginElementNPObject(&actorProtocol, &result);
(result == NPERR_NO_ERROR)) { if (result == NPERR_NO_ERROR) {
actor = mCachedElementActor = actor = mCachedElementActor =
static_cast<PluginScriptableObjectChild*>(actorProtocol); static_cast<PluginScriptableObjectChild*>(actorProtocol);
NS_ASSERTION(actor, "Null actor!"); NS_ASSERTION(actor, "Null actor!");