diff --git a/dom/plugins/base/nsIPluginTag.idl b/dom/plugins/base/nsIPluginTag.idl index 963c5322860f..63809d612f94 100644 --- a/dom/plugins/base/nsIPluginTag.idl +++ b/dom/plugins/base/nsIPluginTag.idl @@ -7,7 +7,7 @@ interface nsIURI; -[scriptable, uuid(5daa99d5-265a-4397-b429-c943803e2619)] +[builtinclass, scriptable, uuid(5daa99d5-265a-4397-b429-c943803e2619)] interface nsIPluginTag : nsISupports { // enabledState is stored as one of the following as an integer in prefs, @@ -30,21 +30,28 @@ interface nsIPluginTag : nsISupports */ // FIXME-jsplugins QI to fakePluginTag possible // FIXME-jsplugins implement missing + tests (whatever that means) + [infallible] readonly attribute boolean blocklisted; /** * true if the state is non-default and locked, false otherwise. */ + [infallible] readonly attribute boolean isEnabledStateLocked; // If this plugin is capable of being used (not disabled, blocklisted, etc) + [infallible] readonly attribute boolean active; // Get a specific nsIBlocklistService::STATE_* + [infallible] readonly attribute unsigned long blocklistState; + [infallible] readonly attribute boolean disabled; + [infallible] readonly attribute boolean clicktoplay; + [infallible] readonly attribute boolean loaded; // See the STATE_* values above. attribute unsigned long enabledState; @@ -66,7 +73,7 @@ interface nsIPluginTag : nsISupports * as a NPAPI plug-in. See nsIPluginHost.registerFakePlugin and the * documentation for the FakePluginTagInit dictionary. */ -[scriptable, uuid(6d22c968-226d-4156-b230-da6ad6bbf6e8)] +[builtinclass, scriptable, uuid(6d22c968-226d-4156-b230-da6ad6bbf6e8)] interface nsIFakePluginTag : nsIPluginTag { /** diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index c5182b761e59..6106466e409f 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -305,8 +305,7 @@ class BlocklistPromiseHandler final : public mozilla::dom::PromiseNativeHandler "Shouldn't get an out of bounds blocklist state"); // Check the old and new state and see if there was a change: - uint32_t oldState = nsIBlocklistService::STATE_NOT_BLOCKED; - MOZ_ALWAYS_SUCCEEDS(mTag->GetBlocklistState(&oldState)); + uint32_t oldState = mTag->GetBlocklistState(); bool changed = oldState != (uint32_t)newState; mTag->SetBlocklistState(newState);