зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1456324: Part 2 - Mark infallible nsIPluginTag getters as infallible. r=Gijs
MozReview-Commit-ID: B7fkZVeDfJZ --HG-- extra : rebase_source : 5ad69df704574acc589e1094fcfee0ad25286a77 extra : histedit_source : d8b2ecea2586a43c7839a43053f29bf872d02d2e
This commit is contained in:
Родитель
efab220d5f
Коммит
04176fe891
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
interface nsIURI;
|
interface nsIURI;
|
||||||
|
|
||||||
[scriptable, uuid(5daa99d5-265a-4397-b429-c943803e2619)]
|
[builtinclass, scriptable, uuid(5daa99d5-265a-4397-b429-c943803e2619)]
|
||||||
interface nsIPluginTag : nsISupports
|
interface nsIPluginTag : nsISupports
|
||||||
{
|
{
|
||||||
// enabledState is stored as one of the following as an integer in prefs,
|
// 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 QI to fakePluginTag possible
|
||||||
// FIXME-jsplugins implement missing + tests (whatever that means)
|
// FIXME-jsplugins implement missing + tests (whatever that means)
|
||||||
|
[infallible]
|
||||||
readonly attribute boolean blocklisted;
|
readonly attribute boolean blocklisted;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* true if the state is non-default and locked, false otherwise.
|
* true if the state is non-default and locked, false otherwise.
|
||||||
*/
|
*/
|
||||||
|
[infallible]
|
||||||
readonly attribute boolean isEnabledStateLocked;
|
readonly attribute boolean isEnabledStateLocked;
|
||||||
|
|
||||||
// If this plugin is capable of being used (not disabled, blocklisted, etc)
|
// If this plugin is capable of being used (not disabled, blocklisted, etc)
|
||||||
|
[infallible]
|
||||||
readonly attribute boolean active;
|
readonly attribute boolean active;
|
||||||
|
|
||||||
// Get a specific nsIBlocklistService::STATE_*
|
// Get a specific nsIBlocklistService::STATE_*
|
||||||
|
[infallible]
|
||||||
readonly attribute unsigned long blocklistState;
|
readonly attribute unsigned long blocklistState;
|
||||||
|
|
||||||
|
[infallible]
|
||||||
readonly attribute boolean disabled;
|
readonly attribute boolean disabled;
|
||||||
|
[infallible]
|
||||||
readonly attribute boolean clicktoplay;
|
readonly attribute boolean clicktoplay;
|
||||||
|
[infallible]
|
||||||
readonly attribute boolean loaded;
|
readonly attribute boolean loaded;
|
||||||
// See the STATE_* values above.
|
// See the STATE_* values above.
|
||||||
attribute unsigned long enabledState;
|
attribute unsigned long enabledState;
|
||||||
|
@ -66,7 +73,7 @@ interface nsIPluginTag : nsISupports
|
||||||
* as a NPAPI plug-in. See nsIPluginHost.registerFakePlugin and the
|
* as a NPAPI plug-in. See nsIPluginHost.registerFakePlugin and the
|
||||||
* documentation for the FakePluginTagInit dictionary.
|
* documentation for the FakePluginTagInit dictionary.
|
||||||
*/
|
*/
|
||||||
[scriptable, uuid(6d22c968-226d-4156-b230-da6ad6bbf6e8)]
|
[builtinclass, scriptable, uuid(6d22c968-226d-4156-b230-da6ad6bbf6e8)]
|
||||||
interface nsIFakePluginTag : nsIPluginTag
|
interface nsIFakePluginTag : nsIPluginTag
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -305,8 +305,7 @@ class BlocklistPromiseHandler final : public mozilla::dom::PromiseNativeHandler
|
||||||
"Shouldn't get an out of bounds blocklist state");
|
"Shouldn't get an out of bounds blocklist state");
|
||||||
|
|
||||||
// Check the old and new state and see if there was a change:
|
// Check the old and new state and see if there was a change:
|
||||||
uint32_t oldState = nsIBlocklistService::STATE_NOT_BLOCKED;
|
uint32_t oldState = mTag->GetBlocklistState();
|
||||||
MOZ_ALWAYS_SUCCEEDS(mTag->GetBlocklistState(&oldState));
|
|
||||||
bool changed = oldState != (uint32_t)newState;
|
bool changed = oldState != (uint32_t)newState;
|
||||||
mTag->SetBlocklistState(newState);
|
mTag->SetBlocklistState(newState);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче