diff --git a/mozilla/caps/src/nsSecurityManagerFactory.cpp b/mozilla/caps/src/nsSecurityManagerFactory.cpp index 48e891bfec9..43f10092f37 100644 --- a/mozilla/caps/src/nsSecurityManagerFactory.cpp +++ b/mozilla/caps/src/nsSecurityManagerFactory.cpp @@ -271,14 +271,15 @@ netscape_security_invalidate(JSContext *cx, JSObject *obj, uintN argc, } static JSFunctionSpec PrivilegeManager_static_methods[] = { - { "isPrivilegeEnabled", netscape_security_isPrivilegeEnabled, 1}, - { "enablePrivilege", netscape_security_enablePrivilege, 1}, - { "disablePrivilege", netscape_security_disablePrivilege, 1}, - { "revertPrivilege", netscape_security_revertPrivilege, 1}, + { "isPrivilegeEnabled", netscape_security_isPrivilegeEnabled, 1,0,0}, + { "enablePrivilege", netscape_security_enablePrivilege, 1,0,0}, + { "disablePrivilege", netscape_security_disablePrivilege, 1,0,0}, + { "revertPrivilege", netscape_security_revertPrivilege, 1,0,0}, //-- System Cert Functions - { "setCanEnablePrivilege", netscape_security_setCanEnablePrivilege, 2}, - { "invalidate", netscape_security_invalidate, 1}, - {0} + { "setCanEnablePrivilege", netscape_security_setCanEnablePrivilege, + 2,0,0}, + { "invalidate", netscape_security_invalidate, 1,0,0}, + {nsnull,nsnull,0,0,0} }; /* diff --git a/mozilla/extensions/jssh/nsJSSh.cpp b/mozilla/extensions/jssh/nsJSSh.cpp index 8389d4c0701..74e37cb4f8e 100644 --- a/mozilla/extensions/jssh/nsJSSh.cpp +++ b/mozilla/extensions/jssh/nsJSSh.cpp @@ -390,22 +390,22 @@ GetOutputStream(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rv // win.p = print, where win is rooted in some other global // object. static JSFunctionSpec global_functions[] = { - {"print", Print, 1, JSFUN_BOUND_METHOD}, - {"dump", Print, 1, JSFUN_BOUND_METHOD}, - {"quit", Quit, 0, JSFUN_BOUND_METHOD}, - {"exit", Quit, 0, JSFUN_BOUND_METHOD}, - {"load", Load, 1, JSFUN_BOUND_METHOD}, - {"suspend", Suspend, 0, JSFUN_BOUND_METHOD}, - {"resume", Resume, 0, JSFUN_BOUND_METHOD}, - {"flushEventQueue", FlushEventQueue,0, JSFUN_BOUND_METHOD}, - {"addressOf", AddressOf, 1, 0}, - {"setProtocol", SetProtocol, 1, JSFUN_BOUND_METHOD}, - {"getProtocol", GetProtocol, 0, JSFUN_BOUND_METHOD}, - {"setContextObj", SetContextObj, 1, JSFUN_BOUND_METHOD}, - {"debugBreak", DebugBreak, 0, JSFUN_BOUND_METHOD}, - {"getInputStream", GetInputStream, 0, JSFUN_BOUND_METHOD}, - {"getOutputStream", GetOutputStream,0, JSFUN_BOUND_METHOD}, - {0} + {"print", Print, 1, JSFUN_BOUND_METHOD, 0}, + {"dump", Print, 1, JSFUN_BOUND_METHOD, 0}, + {"quit", Quit, 0, JSFUN_BOUND_METHOD, 0}, + {"exit", Quit, 0, JSFUN_BOUND_METHOD, 0}, + {"load", Load, 1, JSFUN_BOUND_METHOD, 0}, + {"suspend", Suspend, 0, JSFUN_BOUND_METHOD, 0}, + {"resume", Resume, 0, JSFUN_BOUND_METHOD, 0}, + {"flushEventQueue", FlushEventQueue,0, JSFUN_BOUND_METHOD, 0}, + {"addressOf", AddressOf, 1, 0, 0}, + {"setProtocol", SetProtocol, 1, JSFUN_BOUND_METHOD, 0}, + {"getProtocol", GetProtocol, 0, JSFUN_BOUND_METHOD, 0}, + {"setContextObj", SetContextObj, 1, JSFUN_BOUND_METHOD, 0}, + {"debugBreak", DebugBreak, 0, JSFUN_BOUND_METHOD, 0}, + {"getInputStream", GetInputStream, 0, JSFUN_BOUND_METHOD, 0}, + {"getOutputStream", GetOutputStream,0, JSFUN_BOUND_METHOD, 0}, + {nsnull, nsnull, 0, 0, 0} }; diff --git a/mozilla/js/src/js.c b/mozilla/js/src/js.c index 6828d4adb46..dee7c991ddf 100644 --- a/mozilla/js/src/js.c +++ b/mozilla/js/src/js.c @@ -1190,7 +1190,7 @@ DumpScope(JSContext *cx, JSObject *obj, FILE *fp) for (sprop = SCOPE_LAST_PROP(scope); sprop; sprop = sprop->parent) { if (SCOPE_HAD_MIDDLE_DELETE(scope) && !SCOPE_HAS_PROPERTY(scope, sprop)) continue; - fprintf(fp, "%3u %p", i, sprop); + fprintf(fp, "%3u %p", i, (void *)sprop); if (JSID_IS_INT(sprop->id)) { fprintf(fp, " [%ld]", (long)JSVAL_TO_INT(sprop->id)); } else if (JSID_IS_ATOM(sprop->id)) { @@ -1211,7 +1211,7 @@ DumpScope(JSContext *cx, JSObject *obj, FILE *fp) #undef DUMP_ATTR fprintf(fp, " slot %lu flags %x shortid %d\n", - sprop->slot, sprop->flags, sprop->shortid); + (unsigned long)sprop->slot, sprop->flags, sprop->shortid); } } @@ -1666,7 +1666,8 @@ static JSClass sandbox_class = { JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, sandbox_enumerate, (JSResolveOp)sandbox_resolve, - JS_ConvertStub, JS_FinalizeStub + JS_ConvertStub, JS_FinalizeStub, + JSCLASS_NO_OPTIONAL_MEMBERS }; static JSBool @@ -1730,44 +1731,44 @@ out: } static JSFunctionSpec shell_functions[] = { - {"version", Version, 0}, - {"options", Options, 0}, - {"load", Load, 1}, - {"readline", ReadLine, 0}, - {"print", Print, 0}, - {"help", Help, 0}, - {"quit", Quit, 0}, - {"gc", GC, 0}, - {"trap", Trap, 3}, - {"untrap", Untrap, 2}, - {"line2pc", LineToPC, 0}, - {"pc2line", PCToLine, 0}, - {"stringsAreUtf8", StringsAreUtf8, 0}, - {"testUtf8", TestUtf8, 1}, - {"throwError", ThrowError, 0}, + {"version", Version, 0,0,0}, + {"options", Options, 0,0,0}, + {"load", Load, 1,0,0}, + {"readline", ReadLine, 0,0,0}, + {"print", Print, 0,0,0}, + {"help", Help, 0,0,0}, + {"quit", Quit, 0,0,0}, + {"gc", GC, 0,0,0}, + {"trap", Trap, 3,0,0}, + {"untrap", Untrap, 2,0,0}, + {"line2pc", LineToPC, 0,0,0}, + {"pc2line", PCToLine, 0,0,0}, + {"stringsAreUtf8", StringsAreUtf8, 0,0,0}, + {"testUtf8", TestUtf8, 1,0,0}, + {"throwError", ThrowError, 0,0,0}, #ifdef DEBUG - {"dis", Disassemble, 1}, - {"dissrc", DisassWithSrc, 1}, - {"notes", Notes, 1}, - {"tracing", Tracing, 0}, - {"stats", DumpStats, 1}, + {"dis", Disassemble, 1,0,0}, + {"dissrc", DisassWithSrc, 1,0,0}, + {"notes", Notes, 1,0,0}, + {"tracing", Tracing, 0,0,0}, + {"stats", DumpStats, 1,0,0}, #endif #ifdef TEST_EXPORT - {"xport", DoExport, 2}, + {"xport", DoExport, 2,0,0}, #endif #ifdef TEST_CVTARGS - {"cvtargs", ConvertArgs, 0, 0, 12}, + {"cvtargs", ConvertArgs, 0,0,12}, #endif - {"build", BuildDate, 0}, - {"clear", Clear, 0}, - {"intern", Intern, 1}, - {"clone", Clone, 1}, - {"seal", Seal, 1, 0, 1}, - {"getpda", GetPDA, 1}, - {"getslx", GetSLX, 1}, - {"toint32", ToInt32, 1}, - {"evalcx", EvalInContext, 1}, - {0} + {"build", BuildDate, 0,0,0}, + {"clear", Clear, 0,0,0}, + {"intern", Intern, 1,0,0}, + {"clone", Clone, 1,0,0}, + {"seal", Seal, 1,0,1}, + {"getpda", GetPDA, 1,0,0}, + {"getslx", GetSLX, 1,0,0}, + {"toint32", ToInt32, 1,0,0}, + {"evalcx", EvalInContext, 1,0,0}, + {NULL,NULL,0,0,0} }; /* NOTE: These must be kept in sync with the above. */ @@ -1891,13 +1892,13 @@ enum its_tinyid { }; static JSPropertySpec its_props[] = { - {"color", ITS_COLOR, JSPROP_ENUMERATE}, - {"height", ITS_HEIGHT, JSPROP_ENUMERATE}, - {"width", ITS_WIDTH, JSPROP_ENUMERATE}, - {"funny", ITS_FUNNY, JSPROP_ENUMERATE}, - {"array", ITS_ARRAY, JSPROP_ENUMERATE}, - {"rdonly", ITS_RDONLY, JSPROP_READONLY}, - {0} + {"color", ITS_COLOR, JSPROP_ENUMERATE, NULL, NULL}, + {"height", ITS_HEIGHT, JSPROP_ENUMERATE, NULL, NULL}, + {"width", ITS_WIDTH, JSPROP_ENUMERATE, NULL, NULL}, + {"funny", ITS_FUNNY, JSPROP_ENUMERATE, NULL, NULL}, + {"array", ITS_ARRAY, JSPROP_ENUMERATE, NULL, NULL}, + {"rdonly", ITS_RDONLY, JSPROP_READONLY, NULL, NULL}, + {NULL,0,0,NULL,NULL} }; static JSBool @@ -1937,9 +1938,9 @@ its_bindMethod(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, } static JSFunctionSpec its_methods[] = { - {"item", its_item, 0}, - {"bindMethod", its_bindMethod, 2}, - {0} + {"item", its_item, 0,0,0}, + {"bindMethod", its_bindMethod, 2,0,0}, + {NULL,NULL,0,0,0} }; #ifdef JSD_LOWLEVEL_SOURCE @@ -2073,12 +2074,13 @@ static JSClass its_class = { "It", JSCLASS_NEW_RESOLVE, its_addProperty, its_delProperty, its_getProperty, its_setProperty, its_enumerate, (JSResolveOp)its_resolve, - its_convert, its_finalize + its_convert, its_finalize, + JSCLASS_NO_OPTIONAL_MEMBERS }; JSErrorFormatString jsShell_ErrorFormatString[JSErr_Limit] = { #define MSG_DEF(name, number, count, exception, format) \ - { format, count } , + { format, count, JSEXN_ERR } , #include "jsshell.msg" #undef MSG_DEF }; @@ -2303,7 +2305,8 @@ JSClass global_class = { JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, global_enumerate, (JSResolveOp) global_resolve, - JS_ConvertStub, JS_FinalizeStub + JS_ConvertStub, JS_FinalizeStub, + JSCLASS_NO_OPTIONAL_MEMBERS }; static JSBool @@ -2417,7 +2420,8 @@ static JSClass env_class = { JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, env_setProperty, env_enumerate, (JSResolveOp) env_resolve, - JS_ConvertStub, JS_FinalizeStub + JS_ConvertStub, JS_FinalizeStub, + JSCLASS_NO_OPTIONAL_MEMBERS }; #ifdef NARCISSUS diff --git a/mozilla/js/src/jsapi.c b/mozilla/js/src/jsapi.c index 1872bcda828..e75735f77ee 100644 --- a/mozilla/js/src/jsapi.c +++ b/mozilla/js/src/jsapi.c @@ -3653,6 +3653,9 @@ JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs) CHECK_REQUEST(cx); ctor = NULL; for (; fs->name; fs++) { + + /* High bits of fs->extra are reserved. */ + JS_ASSERT((fs->extra & 0xFFFF0000) == 0); flags = fs->flags; /* diff --git a/mozilla/js/src/jsapi.h b/mozilla/js/src/jsapi.h index 90b81ad5223..1f6f8b189a5 100644 --- a/mozilla/js/src/jsapi.h +++ b/mozilla/js/src/jsapi.h @@ -1118,8 +1118,10 @@ struct JSFunctionSpec { JSNative call; uint16 nargs; uint16 flags; - uint16 extra; /* number of arg slots for local GC roots */ - uint16 spare; + uint32 extra; /* extra & 0xFFFF: + number of arg slots for local GC roots + extra >> 16: + reserved, must be zero */ }; extern JS_PUBLIC_API(JSObject *) diff --git a/mozilla/js/src/perlconnect/jsperl.c b/mozilla/js/src/perlconnect/jsperl.c index 48d904add21..0f104c7c959 100644 --- a/mozilla/js/src/perlconnect/jsperl.c +++ b/mozilla/js/src/perlconnect/jsperl.c @@ -118,11 +118,11 @@ JSClass perlClass = { }; static JSFunctionSpec perlMethods[] = { - {"toString", (JSNative)PerlToString, 0}, - {"eval", (JSNative)perl_eval, 0}, - {"call", (JSNative)perl_call, 0}, - {"use", (JSNative)perl_use, 0}, - { NULL, NULL,0 } + {"toString", (JSNative)PerlToString, 0,0,0}, + {"eval", (JSNative)perl_eval, 0,0,0}, + {"call", (JSNative)perl_call, 0,0,0}, + {"use", (JSNative)perl_use, 0,0,0}, + {NULL, NULL, 0,0,0} }; @@ -134,8 +134,8 @@ JSClass perlModuleClass = { }; JSFunctionSpec perlModuleMethods[] = { - {"toString", (JSNative)PMToString, 0}, - { NULL, NULL,0 } + {"toString", (JSNative)PMToString, 0,0,0}, + {NULL, NULL, 0,0,0} }; @@ -147,8 +147,8 @@ JSClass perlValueClass = { }; JSFunctionSpec perlValueMethods[] = { - {"toString", (JSNative)PVToString, 0}, - { NULL, NULL, 0} + {"toString", (JSNative)PVToString, 0,0,0}, + {NULL, NULL, 0,0,0} }; /* diff --git a/mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp index 9702fc7f6cd..0ec4e4628e5 100644 --- a/mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp +++ b/mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp @@ -191,9 +191,9 @@ Debug(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) } static JSFunctionSpec gGlobalFun[] = { - {"dump", Dump, 1 }, - {"debug", Debug, 1 }, - {0} + {"dump", Dump, 1,0,0}, + {"debug", Debug, 1,0,0}, + {nsnull,nsnull,0,0,0} }; class JSCLContextHelper diff --git a/mozilla/js/src/xpconnect/shell/xpcshell.cpp b/mozilla/js/src/xpconnect/shell/xpcshell.cpp index 3589386101a..7350c3d8279 100644 --- a/mozilla/js/src/xpconnect/shell/xpcshell.cpp +++ b/mozilla/js/src/xpconnect/shell/xpcshell.cpp @@ -352,16 +352,16 @@ Clear(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) } static JSFunctionSpec glob_functions[] = { - {"print", Print, 0}, - {"load", Load, 1}, - {"quit", Quit, 0}, - {"version", Version, 1}, - {"build", BuildDate, 0}, - {"dumpXPC", DumpXPC, 1}, - {"dump", Dump, 1}, - {"gc", GC, 0}, - {"clear", Clear, 1}, - {0} + {"print", Print, 0,0,0}, + {"load", Load, 1,0,0}, + {"quit", Quit, 0,0,0}, + {"version", Version, 1,0,0}, + {"build", BuildDate, 0,0,0}, + {"dumpXPC", DumpXPC, 1,0,0}, + {"dump", Dump, 1,0,0}, + {"gc", GC, 0,0,0}, + {"clear", Clear, 1,0,0}, + {nsnull,nsnull,0,0,0} }; JSClass global_class = { diff --git a/mozilla/js/src/xpconnect/src/xpccomponents.cpp b/mozilla/js/src/xpconnect/src/xpccomponents.cpp index a2a7eb58553..c1fabaad17f 100644 --- a/mozilla/js/src/xpconnect/src/xpccomponents.cpp +++ b/mozilla/js/src/xpconnect/src/xpccomponents.cpp @@ -2133,9 +2133,9 @@ static JSClass SandboxClass = { }; static JSFunctionSpec SandboxFunctions[] = { - {"dump", SandboxDump, 1}, - {"debug", SandboxDebug, 1}, - {0} + {"dump", SandboxDump, 1,0,0}, + {"debug", SandboxDebug, 1,0,0}, + {nsnull,nsnull,0,0,0} }; #endif /* !XPCONNECT_STANDALONE */ diff --git a/mozilla/js/src/xpconnect/tests/TestXPC.cpp b/mozilla/js/src/xpconnect/tests/TestXPC.cpp index cfb3a6d8f64..ac69642ab9b 100644 --- a/mozilla/js/src/xpconnect/tests/TestXPC.cpp +++ b/mozilla/js/src/xpconnect/tests/TestXPC.cpp @@ -116,9 +116,9 @@ Load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) } static JSFunctionSpec glob_functions[] = { - {"print", Print, 0}, - {"load", Load, 1}, - {0} + {"print", Print, 0,0,0}, + {"load", Load, 1,0,0}, + {nsnull,nsnull,0,0,0} }; static JSClass global_class = { diff --git a/mozilla/xpinstall/src/nsJSFile.cpp b/mozilla/xpinstall/src/nsJSFile.cpp index b120980f485..3ae9838f455 100644 --- a/mozilla/xpinstall/src/nsJSFile.cpp +++ b/mozilla/xpinstall/src/nsJSFile.cpp @@ -1416,31 +1416,31 @@ InstallFileOpWinRegisterServer(JSContext *cx, JSObject *obj, uintN argc, jsval * // static JSFunctionSpec FileOpMethods[] = { - {"dirCreate", InstallFileOpDirCreate, 1}, - {"dirGetParent", InstallFileOpDirGetParent, 1}, - {"dirRemove", InstallFileOpDirRemove, 2}, - {"dirRename", InstallFileOpDirRename, 2}, - {"copy", InstallFileOpFileCopy, 2}, - {"remove", InstallFileOpFileRemove, 1}, - {"exists", InstallFileOpFileExists, 1}, - {"execute", InstallFileOpFileExecute, 2}, - {"nativeVersion", InstallFileOpFileGetNativeVersion, 1}, - {"windowsVersion", InstallFileOpFileGetNativeVersion, 1}, - {"diskSpaceAvailable", InstallFileOpFileGetDiskSpaceAvailable,1}, - {"modDate", InstallFileOpFileGetModDate, 1}, - {"size", InstallFileOpFileGetSize, 1}, - {"isDirectory", InstallFileOpFileIsDirectory, 1}, - {"isWritable", InstallFileOpFileIsWritable, 1}, - {"isFile", InstallFileOpFileIsFile, 1}, - {"modDateChanged", InstallFileOpFileModDateChanged, 2}, - {"move", InstallFileOpFileMove, 2}, - {"rename", InstallFileOpFileRename, 2}, - {"windowsGetShortName", InstallFileOpFileWindowsGetShortName, 1}, - {"windowsShortcut", InstallFileOpFileWindowsShortcut, 7}, - {"macAlias", InstallFileOpFileMacAlias, 2}, - {"unixLink", InstallFileOpFileUnixLink, 2}, - {"windowsRegisterServer", InstallFileOpWinRegisterServer, 1}, - {0} + {"dirCreate", InstallFileOpDirCreate, 1,0,0}, + {"dirGetParent", InstallFileOpDirGetParent, 1,0,0}, + {"dirRemove", InstallFileOpDirRemove, 2,0,0}, + {"dirRename", InstallFileOpDirRename, 2,0,0}, + {"copy", InstallFileOpFileCopy, 2,0,0}, + {"remove", InstallFileOpFileRemove, 1,0,0}, + {"exists", InstallFileOpFileExists, 1,0,0}, + {"execute", InstallFileOpFileExecute, 2,0,0}, + {"nativeVersion", InstallFileOpFileGetNativeVersion, 1,0,0}, + {"windowsVersion", InstallFileOpFileGetNativeVersion, 1,0,0}, + {"diskSpaceAvailable", InstallFileOpFileGetDiskSpaceAvailable,1,0,0}, + {"modDate", InstallFileOpFileGetModDate, 1,0,0}, + {"size", InstallFileOpFileGetSize, 1,0,0}, + {"isDirectory", InstallFileOpFileIsDirectory, 1,0,0}, + {"isWritable", InstallFileOpFileIsWritable, 1,0,0}, + {"isFile", InstallFileOpFileIsFile, 1,0,0}, + {"modDateChanged", InstallFileOpFileModDateChanged, 2,0,0}, + {"move", InstallFileOpFileMove, 2,0,0}, + {"rename", InstallFileOpFileRename, 2,0,0}, + {"windowsGetShortName", InstallFileOpFileWindowsGetShortName, 1,0,0}, + {"windowsShortcut", InstallFileOpFileWindowsShortcut, 7,0,0}, + {"macAlias", InstallFileOpFileMacAlias, 2,0,0}, + {"unixLink", InstallFileOpFileUnixLink, 2,0,0}, + {"windowsRegisterServer", InstallFileOpWinRegisterServer, 1,0,0}, + {nsnull,nsnull,0,0,0} }; diff --git a/mozilla/xpinstall/src/nsJSFileSpecObj.cpp b/mozilla/xpinstall/src/nsJSFileSpecObj.cpp index e52b551b17c..149c1e58578 100644 --- a/mozilla/xpinstall/src/nsJSFileSpecObj.cpp +++ b/mozilla/xpinstall/src/nsJSFileSpecObj.cpp @@ -139,9 +139,9 @@ static void PR_CALLBACK FileSpecObjectCleanup(JSContext *cx, JSObject *obj) // static JSFunctionSpec fileSpecObjMethods[] = { - {"appendPath", fso_AppendPath, 1}, - {"toString", fso_ToString, 0}, - {0} + {"appendPath", fso_AppendPath, 1,0,0}, + {"toString", fso_ToString, 0,0,0}, + {nsnull,nsnull,0,0,0} }; diff --git a/mozilla/xpinstall/src/nsJSInstall.cpp b/mozilla/xpinstall/src/nsJSInstall.cpp index f22535f647f..b08c96c711a 100644 --- a/mozilla/xpinstall/src/nsJSInstall.cpp +++ b/mozilla/xpinstall/src/nsJSInstall.cpp @@ -1867,64 +1867,64 @@ static JSConstDoubleSpec install_constants[] = static JSFunctionSpec InstallMethods[] = { /*START HACK FOR DEBUGGING UNTIL ALERTS WORK*/ - {"TRACE", InstallTRACE, 1}, + {"TRACE", InstallTRACE, 1,0,0}, /*END HACK FOR DEBUGGING UNTIL ALERTS WORK*/ // -- new forms that match prevailing javascript style -- - {"addDirectory", InstallAddDirectory, 6}, - {"addFile", InstallAddSubcomponent, 6}, - {"alert", InstallAlert, 1}, - {"cancelInstall", InstallAbortInstall, 1}, - {"confirm", InstallConfirm, 8}, - {"execute", InstallExecute, 2}, - {"gestalt", InstallGestalt, 1}, - {"getComponentFolder", InstallGetComponentFolder, 2}, - {"getFolder", InstallGetFolder, 2}, - {"getLastError", InstallGetLastError, 0}, - {"getWinProfile", InstallGetWinProfile, 2}, - {"getWinRegistry", InstallGetWinRegistry, 0}, - {"initInstall", InstallStartInstall, 4}, - {"loadResources", InstallLoadResources, 1}, - {"logComment", InstallLogComment, 1}, - {"patch", InstallPatch, 5}, - {"performInstall", InstallFinalizeInstall, 0}, - {"registerChrome", InstallRegisterChrome, 2}, - {"refreshPlugins", InstallRefreshPlugins, 1}, - {"resetError", InstallResetError, 1}, -// {"selectChrome", InstallSelectChrome, 2}, - {"setPackageFolder", InstallSetPackageFolder, 1}, - {"uninstall", InstallUninstall, 1}, + {"addDirectory", InstallAddDirectory, 6,0,0}, + {"addFile", InstallAddSubcomponent, 6,0,0}, + {"alert", InstallAlert, 1,0,0}, + {"cancelInstall", InstallAbortInstall, 1,0,0}, + {"confirm", InstallConfirm, 8,0,0}, + {"execute", InstallExecute, 2,0,0}, + {"gestalt", InstallGestalt, 1,0,0}, + {"getComponentFolder", InstallGetComponentFolder, 2,0,0}, + {"getFolder", InstallGetFolder, 2,0,0}, + {"getLastError", InstallGetLastError, 0,0,0}, + {"getWinProfile", InstallGetWinProfile, 2,0,0}, + {"getWinRegistry", InstallGetWinRegistry, 0,0,0}, + {"initInstall", InstallStartInstall, 4,0,0}, + {"loadResources", InstallLoadResources, 1,0,0}, + {"logComment", InstallLogComment, 1,0,0}, + {"patch", InstallPatch, 5,0,0}, + {"performInstall", InstallFinalizeInstall, 0,0,0}, + {"registerChrome", InstallRegisterChrome, 2,0,0}, + {"refreshPlugins", InstallRefreshPlugins, 1,0,0}, + {"resetError", InstallResetError, 1,0,0}, +// {"selectChrome", InstallSelectChrome, 2,0,0}, + {"setPackageFolder", InstallSetPackageFolder, 1,0,0}, + {"uninstall", InstallUninstall, 1,0,0}, // the raw file methods are deprecated, use the File object instead - {"dirCreate", InstallFileOpDirCreate, 1}, - {"dirGetParent", InstallFileOpDirGetParent, 1}, - {"dirRemove", InstallFileOpDirRemove, 2}, - {"dirRename", InstallFileOpDirRename, 2}, - {"fileCopy", InstallFileOpFileCopy, 2}, - {"fileDelete", InstallFileOpFileRemove, 1}, - {"fileExists", InstallFileOpFileExists, 1}, - {"fileExecute", InstallFileOpFileExecute, 2}, - {"fileGetNativeVersion", InstallFileOpFileGetNativeVersion, 1}, - {"fileGetDiskSpaceAvailable", InstallFileOpFileGetDiskSpaceAvailable,1}, - {"fileGetModDate", InstallFileOpFileGetModDate, 1}, - {"fileGetSize", InstallFileOpFileGetSize, 1}, - {"fileIsDirectory", InstallFileOpFileIsDirectory, 1}, - {"fileIsWritable", InstallFileOpFileIsWritable, 1}, - {"fileIsFile", InstallFileOpFileIsFile, 1}, - {"fileModDateChanged", InstallFileOpFileModDateChanged, 2}, - {"fileMove", InstallFileOpFileMove, 2}, - {"fileRename", InstallFileOpFileRename, 2}, - {"fileWindowsShortcut", InstallFileOpFileWindowsShortcut, 7}, - {"fileMacAlias", InstallFileOpFileMacAlias, 2}, - {"fileUnixLink", InstallFileOpFileUnixLink, 2}, + {"dirCreate", InstallFileOpDirCreate, 1,0,0}, + {"dirGetParent", InstallFileOpDirGetParent, 1,0,0}, + {"dirRemove", InstallFileOpDirRemove, 2,0,0}, + {"dirRename", InstallFileOpDirRename, 2,0,0}, + {"fileCopy", InstallFileOpFileCopy, 2,0,0}, + {"fileDelete", InstallFileOpFileRemove, 1,0,0}, + {"fileExists", InstallFileOpFileExists, 1,0,0}, + {"fileExecute", InstallFileOpFileExecute, 2,0,0}, + {"fileGetNativeVersion", InstallFileOpFileGetNativeVersion, 1,0,0}, + {"fileGetDiskSpaceAvailable", InstallFileOpFileGetDiskSpaceAvailable,1,0,0}, + {"fileGetModDate", InstallFileOpFileGetModDate, 1,0,0}, + {"fileGetSize", InstallFileOpFileGetSize, 1,0,0}, + {"fileIsDirectory", InstallFileOpFileIsDirectory, 1,0,0}, + {"fileIsWritable", InstallFileOpFileIsWritable, 1,0,0}, + {"fileIsFile", InstallFileOpFileIsFile, 1,0,0}, + {"fileModDateChanged", InstallFileOpFileModDateChanged, 2,0,0}, + {"fileMove", InstallFileOpFileMove, 2,0,0}, + {"fileRename", InstallFileOpFileRename, 2,0,0}, + {"fileWindowsShortcut", InstallFileOpFileWindowsShortcut, 7,0,0}, + {"fileMacAlias", InstallFileOpFileMacAlias, 2,0,0}, + {"fileUnixLink", InstallFileOpFileUnixLink, 2,0,0}, // -- documented but never supported -- - {"deleteRegisteredFile", InstallDeleteComponent, 1}, + {"deleteRegisteredFile", InstallDeleteComponent, 1,0,0}, // -- obsolete forms for temporary compatibility -- - {"abortInstall", InstallAbortInstall, 1}, - {"finalizeInstall", InstallFinalizeInstall, 0}, - {"startInstall", InstallStartInstall, 4}, - {0} + {"abortInstall", InstallAbortInstall, 1,0,0}, + {"finalizeInstall", InstallFinalizeInstall, 0,0,0}, + {"startInstall", InstallStartInstall, 4,0,0}, + {nsnull,nsnull,0,0,0} }; diff --git a/mozilla/xpinstall/src/nsJSInstallTriggerGlobal.cpp b/mozilla/xpinstall/src/nsJSInstallTriggerGlobal.cpp index 9a88ea718d4..f4b61ee39e5 100644 --- a/mozilla/xpinstall/src/nsJSInstallTriggerGlobal.cpp +++ b/mozilla/xpinstall/src/nsJSInstallTriggerGlobal.cpp @@ -741,19 +741,19 @@ InstallTriggerGlobalGetVersion(JSContext *cx, JSObject *obj, uintN argc, jsval * static JSFunctionSpec InstallTriggerGlobalMethods[] = { // -- obsolete forms, do not document. Kept for 4.x compatibility - {"UpdateEnabled", InstallTriggerGlobalUpdateEnabled, 0}, - {"StartSoftwareUpdate", InstallTriggerGlobalStartSoftwareUpdate, 2}, - {"CompareVersion", InstallTriggerGlobalCompareVersion, 5}, - {"GetVersion", InstallTriggerGlobalGetVersion, 2}, - {"updateEnabled", InstallTriggerGlobalUpdateEnabled, 0}, + {"UpdateEnabled", InstallTriggerGlobalUpdateEnabled, 0,0,0}, + {"StartSoftwareUpdate", InstallTriggerGlobalStartSoftwareUpdate, 2,0,0}, + {"CompareVersion", InstallTriggerGlobalCompareVersion, 5,0,0}, + {"GetVersion", InstallTriggerGlobalGetVersion, 2,0,0}, + {"updateEnabled", InstallTriggerGlobalUpdateEnabled, 0,0,0}, // -- new forms to match JS style -- - {"enabled", InstallTriggerGlobalUpdateEnabled, 0}, - {"install", InstallTriggerGlobalInstall, 2}, - {"installChrome", InstallTriggerGlobalInstallChrome, 2}, - {"startSoftwareUpdate", InstallTriggerGlobalStartSoftwareUpdate, 2}, - {"compareVersion", InstallTriggerGlobalCompareVersion, 5}, - {"getVersion", InstallTriggerGlobalGetVersion, 2}, - {0} + {"enabled", InstallTriggerGlobalUpdateEnabled, 0,0,0}, + {"install", InstallTriggerGlobalInstall, 2,0,0}, + {"installChrome", InstallTriggerGlobalInstallChrome, 2,0,0}, + {"startSoftwareUpdate", InstallTriggerGlobalStartSoftwareUpdate, 2,0,0}, + {"compareVersion", InstallTriggerGlobalCompareVersion, 5,0,0}, + {"getVersion", InstallTriggerGlobalGetVersion, 2,0,0}, + {nsnull,nsnull,0,0,0} }; @@ -769,7 +769,7 @@ static JSConstDoubleSpec diff_constants[] = { CHROME_LOCALE, "LOCALE" }, { CHROME_CONTENT, "CONTENT" }, { CHROME_ALL, "PACKAGE" }, - {0} + {0,nsnull} }; diff --git a/mozilla/xpinstall/src/nsJSInstallVersion.cpp b/mozilla/xpinstall/src/nsJSInstallVersion.cpp index 318ffa04e12..8a392ec788e 100644 --- a/mozilla/xpinstall/src/nsJSInstallVersion.cpp +++ b/mozilla/xpinstall/src/nsJSInstallVersion.cpp @@ -523,10 +523,10 @@ static JSPropertySpec InstallVersionProperties[] = // static JSFunctionSpec InstallVersionMethods[] = { - {"init", InstallVersionInit, 1}, - {"toString", InstallVersionToString, 0}, - {"compareTo", InstallVersionCompareTo, 1}, - {0} + {"init", InstallVersionInit, 1,0,0}, + {"toString", InstallVersionToString, 0,0,0}, + {"compareTo", InstallVersionCompareTo, 1,0,0}, + {nsnull,nsnull,0,0,0} }; static JSConstDoubleSpec version_constants[] = @@ -540,7 +540,7 @@ static JSConstDoubleSpec version_constants[] = { nsIDOMInstallVersion::MINOR_DIFF_MINUS, "MINOR_DIFF_MINUS" }, { nsIDOMInstallVersion::MAJOR_DIFF, "MAJOR_DIFF" }, { nsIDOMInstallVersion::MAJOR_DIFF_MINUS, "MAJOR_DIFF_MINUS" }, - {0} + {0,nsnull} }; diff --git a/mozilla/xpinstall/src/nsJSWinProfile.cpp b/mozilla/xpinstall/src/nsJSWinProfile.cpp index d2023dc6d73..47d26b4e035 100644 --- a/mozilla/xpinstall/src/nsJSWinProfile.cpp +++ b/mozilla/xpinstall/src/nsJSWinProfile.cpp @@ -185,9 +185,9 @@ static JSConstDoubleSpec winprofile_constants[] = // static JSFunctionSpec WinProfileMethods[] = { - {"getString", WinProfileGetString, 2}, - {"writeString", WinProfileWriteString, 3}, - {0} + {"getString", WinProfileGetString, 2,0,0}, + {"writeString", WinProfileWriteString, 3,0,0}, + {nsnull,nsnull,0,0,0} }; PRInt32 diff --git a/mozilla/xpinstall/src/nsJSWinReg.cpp b/mozilla/xpinstall/src/nsJSWinReg.cpp index 962e624f72d..587f396758a 100644 --- a/mozilla/xpinstall/src/nsJSWinReg.cpp +++ b/mozilla/xpinstall/src/nsJSWinReg.cpp @@ -703,22 +703,22 @@ static JSConstDoubleSpec winreg_constants[] = // static JSFunctionSpec WinRegMethods[] = { - {"setRootKey", WinRegSetRootKey, 1}, - {"keyExists", WinRegKeyExists, 1}, - {"valueExists", WinRegValueExists, 2}, - {"isKeyWritable", WinRegIsKeyWritable, 1}, - {"createKey", WinRegCreateKey, 2}, - {"deleteKey", WinRegDeleteKey, 1}, - {"deleteValue", WinRegDeleteValue, 2}, - {"setValueString", WinRegSetValueString, 3}, - {"getValueString", WinRegGetValueString, 2}, - {"setValueNumber", WinRegSetValueNumber, 3}, - {"getValueNumber", WinRegGetValueNumber, 2}, - {"setValue", WinRegSetValue, 3}, - {"getValue", WinRegGetValue, 2}, - {"enumKeys", WinRegEnumKeys, 2}, - {"enumValueNames", WinRegEnumValueNames, 2}, - {0} + {"setRootKey", WinRegSetRootKey, 1,0,0}, + {"keyExists", WinRegKeyExists, 1,0,0}, + {"valueExists", WinRegValueExists, 2,0,0}, + {"isKeyWritable", WinRegIsKeyWritable, 1,0,0}, + {"createKey", WinRegCreateKey, 2,0,0}, + {"deleteKey", WinRegDeleteKey, 1,0,0}, + {"deleteValue", WinRegDeleteValue, 2,0,0}, + {"setValueString", WinRegSetValueString, 3,0,0}, + {"getValueString", WinRegGetValueString, 2,0,0}, + {"setValueNumber", WinRegSetValueNumber, 3,0,0}, + {"getValueNumber", WinRegGetValueNumber, 2,0,0}, + {"setValue", WinRegSetValue, 3,0,0}, + {"getValue", WinRegGetValue, 2,0,0}, + {"enumKeys", WinRegEnumKeys, 2,0,0}, + {"enumValueNames", WinRegEnumValueNames, 2,0,0}, + {nsnull,nsnull,0,0,0} }; PRInt32