diff options
Diffstat (limited to 'unbreak-plugin-build.patch')
-rw-r--r-- | unbreak-plugin-build.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/unbreak-plugin-build.patch b/unbreak-plugin-build.patch new file mode 100644 index 000000000000..63e624ef353d --- /dev/null +++ b/unbreak-plugin-build.patch @@ -0,0 +1,76 @@ + +# HG changeset patch +# User Ehsan Akhgari <ehsan@mozilla.com> +# Date 1392421799 18000 +# Node ID 0691948a0abedc7db35c4cb67ec11ad06f782ab0 +# Parent 6f78482c5792b03adca38c924cc4a41f6e16b8ff +Bug 784739 follow-up: Use NULL in npruntime.h + +diff --git a/dom/plugins/base/npruntime.h b/dom/plugins/base/npruntime.h +--- a/dom/plugins/base/npruntime.h ++++ b/dom/plugins/base/npruntime.h +@@ -132,23 +132,23 @@ void NPN_ReleaseVariantValue(NPVariant * + #define NPVARIANT_TO_INT32(_v) ((_v).value.intValue) + #define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue) + #define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue) + #define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue) + + #define VOID_TO_NPVARIANT(_v) \ + NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Void; \ +- (_v).value.objectValue = nullptr; \ ++ (_v).value.objectValue = NULL; \ + NP_END_MACRO + + #define NULL_TO_NPVARIANT(_v) \ + NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Null; \ +- (_v).value.objectValue = nullptr; \ ++ (_v).value.objectValue = NULL; \ + NP_END_MACRO + + #define BOOLEAN_TO_NPVARIANT(_val, _v) \ + NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Bool; \ + (_v).value.boolValue = !!(_val); \ + NP_END_MACRO + +@@ -211,17 +211,17 @@ typedef void *NPIdentifier; + + /* + NPObjects have methods and properties. Methods and properties are + identified with NPIdentifiers. These identifiers may be reflected + in script. NPIdentifiers can be either strings or integers, IOW, + methods and properties can be identified by either strings or + integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be + compared using ==. In case of any errors, the requested +- NPIdentifier(s) will be nullptr. NPIdentifier lifetime is controlled ++ NPIdentifier(s) will be NULL. NPIdentifier lifetime is controlled + by the browser. Plugins do not need to worry about memory management + with regards to NPIdentifiers. + */ + NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); + void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, + NPIdentifier *identifiers); + NPIdentifier NPN_GetIntIdentifier(int32_t intid); + bool NPN_IdentifierIsString(NPIdentifier identifier); +@@ -278,17 +278,17 @@ typedef bool (*NPConstructFunctionPtr)(N + NPInvokeFunctionPtr function may return 0 to indicate a void + result. + + NPInvalidateFunctionPtr is called by the scripting environment + when the native code is shutdown. Any attempt to message a + NPObject instance after the invalidate callback has been + called will result in undefined behavior, even if the native code + is still retaining those NPObject instances. (The runtime +- will typically return immediately, with 0 or nullptr, from an ++ will typically return immediately, with 0 or NULL, from an + attempt to dispatch to a NPObject, but this behavior should not + be depended upon.) + + The NPEnumerationFunctionPtr function may pass an array of + NPIdentifiers back to the caller. The callee allocs the memory of + the array using NPN_MemAlloc(), and it's the caller's responsibility + to release it using NPN_MemFree(). + */ + |