summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-11-04 01:24:20 +0100
committerMoonchild <moonchild@palemoon.org>2023-11-08 13:47:43 +0100
commiteb7be8c637b7b382161d009b302ae9713470c553 (patch)
tree710cc937d09e944c7d52954179cec73b5c72383d /dom
parent080c8cc1347937f274e2d7cdab5aea31f00c608f (diff)
downloaduxp-eb7be8c637b7b382161d009b302ae9713470c553.tar.gz
Issue #2342: Use [[nodiscard]] in IPDL generation and fix warnings
DOM plugin code had two warning in IPC caught by [[nodiscard]], these were fixed in one go.
Diffstat (limited to 'dom')
-rwxr-xr-xdom/plugins/ipc/PluginModuleParent.cpp5
-rw-r--r--dom/plugins/ipc/PluginUtilsWin.cpp4
2 files changed, 7 insertions, 2 deletions
diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp
index 4dff7b0f41..c4461bc901 100755
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -2210,7 +2210,10 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance,
if (supportsAsyncRender) {
// Prefs indicates we want async plugin rendering, make sure
// the flash module has support.
- CallModuleSupportsAsyncRender(&supportsAsyncRender);
+ if (!CallModuleSupportsAsyncRender(&supportsAsyncRender)) {
+ // The actual support call failed. Should not happen; abort.
+ return NS_ERROR_FAILURE;
+ }
}
#ifdef _WIN64
// For 64-bit builds force windowless if the flash library doesn't support
diff --git a/dom/plugins/ipc/PluginUtilsWin.cpp b/dom/plugins/ipc/PluginUtilsWin.cpp
index db6387a511..83b91b6b29 100644
--- a/dom/plugins/ipc/PluginUtilsWin.cpp
+++ b/dom/plugins/ipc/PluginUtilsWin.cpp
@@ -34,7 +34,9 @@ public:
for (auto iter = mAudioNotificationSet->ConstIter(); !iter.Done(); iter.Next()) {
PluginModuleParent* pluginModule = iter.Get()->GetKey();
- pluginModule->SendNPP_SetValue_NPNVaudioDeviceChangeDetails(mChangeDetails);
+ if (!pluginModule->SendNPP_SetValue_NPNVaudioDeviceChangeDetails(mChangeDetails)) {
+ // Sending of notification failed. Ignore for now.
+ }
}
return NS_OK;
}