author | Alastor Wu <alwu@mozilla.com> |
Tue, 31 May 2016 10:17:47 +0800 | |
changeset 299562 | c27e49247fe28294d7f04e54d00ab389b5e57378 |
parent 299561 | 109250561b779e707f1f8cde8f54da8f6efb4c06 |
child 299563 | ba07e25e6d1d12276609a02d241d90fc01421c23 |
push id | 77630 |
push user | alwu@mozilla.com |
push date | Tue, 31 May 2016 02:20:34 +0000 |
treeherder | mozilla-inbound@ba07e25e6d1d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1276119 |
milestone | 49.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -2298,16 +2298,23 @@ NPError return NPERR_NO_ERROR; } rv = inst->WindowVolumeChanged(config.mVolume, config.mMuted); if (NS_WARN_IF(NS_FAILED(rv))) { return NPERR_NO_ERROR; } + // Since we only support for muting now, the implementation of suspend + // is equal to muting. Therefore, if we have already muted the plugin, + // then we don't need to call WindowSuspendChanged() again. + if (config.mMuted) { + return NPERR_NO_ERROR; + } + rv = inst->WindowSuspendChanged(config.mSuspend); if (NS_WARN_IF(NS_FAILED(rv))) { return NPERR_NO_ERROR; } } return NPERR_NO_ERROR; }