From 5c1fe971585a12cc5d4e3d3d3b934067e34643d8 Mon Sep 17 00:00:00 2001 From: "jst%mozilla.jstenback.com" Date: Wed, 25 Aug 2004 22:32:41 +0000 Subject: [PATCH] Fixing bug 256898. Initialize all NPN callback functions, and correct an error in the prototype for NPN_IdentifierIsString(). r+sr=brendan@mozilla.org git-svn-id: svn://10.0.0.236/trunk@161282 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/base/public/npruntime.h | 2 +- mozilla/modules/plugin/base/src/ns4xPlugin.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mozilla/modules/plugin/base/public/npruntime.h b/mozilla/modules/plugin/base/public/npruntime.h index e210b40ff50..14047c41fee 100644 --- a/mozilla/modules/plugin/base/public/npruntime.h +++ b/mozilla/modules/plugin/base/public/npruntime.h @@ -254,7 +254,7 @@ 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); +bool NPN_IdentifierIsString(NPIdentifier identifier); /* The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp index 5820d83b8ae..7cc1ffd6d3d 100644 --- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp @@ -338,6 +338,9 @@ ns4xPlugin::CheckClassInitialized(void) CALLBACKS.utf8fromidentifier = NewNPN_UTF8FromIdentifierProc(FP2TV(_utf8fromidentifier)); + CALLBACKS.intfromidentifier = + NewNPN_IntFromIdentifierProc(FP2TV(_intfromidentifier)); + CALLBACKS.createobject = NewNPN_CreateObjectProc(FP2TV(_createobject)); @@ -362,6 +365,12 @@ ns4xPlugin::CheckClassInitialized(void) CALLBACKS.removeproperty = NewNPN_RemovePropertyProc(FP2TV(_removeproperty)); + CALLBACKS.hasproperty = + NewNPN_HasPropertyProc(FP2TV(_hasproperty)); + + CALLBACKS.hasmethod = + NewNPN_HasMethodProc(FP2TV(_hasmethod)); + CALLBACKS.releasevariantvalue = NewNPN_ReleaseVariantValueProc(FP2TV(_releasevariantvalue));