Bug 842687 - Test for uint32_t plug-in value; r=bsmedberg
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Wed, 20 Feb 2013 20:17:21 +0100
changeset 122487 1641778f1619a5306ad2d84aec9bbe5a3a2a6124
parent 122486 42a50bccf86ed209f8f01b8e673cb686c9981688
child 122488 b12d2ab1a3e277ed0780bb952f13565c090bef63
push id24342
push userryanvm@gmail.com
push dateThu, 21 Feb 2013 13:05:06 +0000
treeherdermozilla-central@702d2814efbf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs842687
milestone22.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
Bug 842687 - Test for uint32_t plug-in value; r=bsmedberg
dom/plugins/test/testplugin/nptest.cpp
--- a/dom/plugins/test/testplugin/nptest.cpp
+++ b/dom/plugins/test/testplugin/nptest.cpp
@@ -1506,21 +1506,23 @@ NPP_GetValue(NPP instance, NPPVariable v
   if (variable == NPPVpluginScriptableNPObject) {
     NPObject* object = instanceData->scriptableObject;
     NPN_RetainObject(object);
     *((NPObject**)value) = object;
     return NPERR_NO_ERROR;
   }
   if (variable == NPPVpluginNeedsXEmbed) {
     // Only relevant for X plugins
-    *(NPBool*)value = instanceData->hasWidget;
+    // use 4-byte writes like some plugins may do
+    *(uint32_t*)value = instanceData->hasWidget;
     return NPERR_NO_ERROR;
   }
   if (variable == NPPVpluginWantsAllNetworkStreams) {
-    *(NPBool*)value = instanceData->wantsAllStreams;
+    // use 4-byte writes like some plugins may do
+    *(uint32_t*)value = instanceData->wantsAllStreams;
     return NPERR_NO_ERROR;
   }
 
   return NPERR_GENERIC_ERROR;
 }
 
 NPError
 NPP_SetValue(NPP instance, NPNVariable variable, void* value)