Bug 398946 - Remove JS_STATIC_DLL_CALLBACK and JS_DLL_CALLBACK from the tree; r=(benjamin + bent.mozilla)

This commit is contained in:
Arpad Borsos 2008-09-07 00:21:43 +02:00
Родитель 472b7ea735
Коммит 2cc3af109a
91 изменённых файлов: 695 добавлений и 764 удалений

Просмотреть файл

@ -423,7 +423,7 @@ private:
nsScriptSecurityManager();
virtual ~nsScriptSecurityManager();
static JSBool JS_DLL_CALLBACK
static JSBool
CheckObjectAccess(JSContext *cx, JSObject *obj,
jsval id, JSAccessMode mode,
jsval *vp);

Просмотреть файл

@ -49,19 +49,19 @@
#include "nsMemory.h"
#include "nsStringBuffer.h"
JS_STATIC_DLL_CALLBACK(void *)
static void *
nsGetPrincipalArray(JSContext *cx, JSPrincipals *prin)
{
return nsnull;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
nsGlobalPrivilegesEnabled(JSContext *cx, JSPrincipals *jsprin)
{
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
nsJSPrincipalsSubsume(JSPrincipals *jsprin, JSPrincipals *other)
{
nsJSPrincipals *nsjsprin = static_cast<nsJSPrincipals *>(jsprin);
@ -73,7 +73,7 @@ nsJSPrincipalsSubsume(JSPrincipals *jsprin, JSPrincipals *other)
return NS_SUCCEEDED(rv) && result;
}
JS_STATIC_DLL_CALLBACK(void)
static void
nsDestroyJSPrincipals(JSContext *cx, struct JSPrincipals *jsprin)
{
nsJSPrincipals *nsjsprin = static_cast<nsJSPrincipals *>(jsprin);
@ -99,7 +99,7 @@ nsDestroyJSPrincipals(JSContext *cx, struct JSPrincipals *jsprin)
// so we don't need to worry about "codebase"
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
nsTranscodeJSPrincipals(JSXDRState *xdr, JSPrincipals **jsprinp)
{
nsresult rv;

Просмотреть файл

@ -451,7 +451,7 @@ NS_IMPL_ISUPPORTS5(nsScriptSecurityManager,
///////////////////////////////////////////////////
///////////////// Security Checks /////////////////
JSBool JS_DLL_CALLBACK
JSBool
nsScriptSecurityManager::CheckObjectAccess(JSContext *cx, JSObject *obj,
jsval id, JSAccessMode mode,
jsval *vp)

Просмотреть файл

@ -113,7 +113,7 @@
//
// The JS class for XBLBinding
//
JS_STATIC_DLL_CALLBACK(void)
static void
XBLFinalize(JSContext *cx, JSObject *obj)
{
nsIXBLDocumentInfo* docInfo =
@ -124,7 +124,7 @@ XBLFinalize(JSContext *cx, JSObject *obj)
c->Drop();
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XBLResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp)
{

Просмотреть файл

@ -217,7 +217,7 @@ NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF_AMBIGUOUS(nsXBLDocGlobalObject, nsIScriptGlobalObject)
NS_IMPL_CYCLE_COLLECTING_RELEASE_AMBIGUOUS(nsXBLDocGlobalObject, nsIScriptGlobalObject)
void JS_DLL_CALLBACK
void
XBL_ProtoErrorReporter(JSContext *cx,
const char *message,
JSErrorReport *report)

Просмотреть файл

@ -4347,7 +4347,7 @@ static JSClass sGlobalScopePolluterClass = {
// static
JSBool JS_DLL_CALLBACK
JSBool
nsWindowSH::GlobalScopePolluterGetProperty(JSContext *cx, JSObject *obj,
jsval id, jsval *vp)
{
@ -4374,7 +4374,7 @@ nsWindowSH::GlobalScopePolluterGetProperty(JSContext *cx, JSObject *obj,
}
// static
JSBool JS_DLL_CALLBACK
JSBool
nsWindowSH::SecurityCheckOnSetProp(JSContext *cx, JSObject *obj, jsval id,
jsval *vp)
{
@ -4392,7 +4392,7 @@ nsWindowSH::SecurityCheckOnSetProp(JSContext *cx, JSObject *obj, jsval id,
}
// static
JSBool JS_DLL_CALLBACK
JSBool
nsWindowSH::GlobalScopePolluterNewResolve(JSContext *cx, JSObject *obj,
jsval id, uintN flags,
JSObject **objp)
@ -5826,7 +5826,7 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
// Native code for window._content getter, this simply maps
// window._content to window.content for backwards compatibility only.
static JSBool JS_DLL_CALLBACK
static JSBool
ContentWindowGetter(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -7030,7 +7030,7 @@ nsEventReceiverSH::ReallyIsEventName(jsval id, jschar aFirstChar)
}
// static
JSBool JS_DLL_CALLBACK
JSBool
nsEventReceiverSH::AddEventListenerHelper(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *rval)
{
@ -8016,7 +8016,7 @@ nsHTMLDocumentSH::ResolveImpl(JSContext *cx,
}
// static
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLDocumentSH::DocumentOpen(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval)
{
@ -8176,7 +8176,7 @@ nsHTMLDocumentSH::GetDocumentAllNodeList(JSContext *cx, JSObject *obj,
return *nodeList != nsnull;
}
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLDocumentSH::DocumentAllGetProperty(JSContext *cx, JSObject *obj,
jsval id, jsval *vp)
{
@ -8260,7 +8260,7 @@ nsHTMLDocumentSH::DocumentAllGetProperty(JSContext *cx, JSObject *obj,
return JS_TRUE;
}
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLDocumentSH::DocumentAllNewResolve(JSContext *cx, JSObject *obj, jsval id,
uintN flags, JSObject **objp)
{
@ -8336,7 +8336,7 @@ nsHTMLDocumentSH::DocumentAllNewResolve(JSContext *cx, JSObject *obj, jsval id,
// Finalize hook used by document related JS objects, but also by
// sGlobalScopePolluterClass!
void JS_DLL_CALLBACK
void
nsHTMLDocumentSH::ReleaseDocument(JSContext *cx, JSObject *obj)
{
nsIHTMLDocument *doc = (nsIHTMLDocument *)::JS_GetPrivate(cx, obj);
@ -8344,7 +8344,7 @@ nsHTMLDocumentSH::ReleaseDocument(JSContext *cx, JSObject *obj)
NS_IF_RELEASE(doc);
}
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLDocumentSH::CallToGetPropMapper(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval)
{
@ -8395,7 +8395,7 @@ GetDocumentAllHelper(JSContext *cx, JSObject *obj)
return obj;
}
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLDocumentSH::DocumentAllHelperGetProperty(JSContext *cx, JSObject *obj,
jsval id, jsval *vp)
{
@ -8461,7 +8461,7 @@ nsHTMLDocumentSH::DocumentAllHelperGetProperty(JSContext *cx, JSObject *obj,
return JS_TRUE;
}
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLDocumentSH::DocumentAllHelperNewResolve(JSContext *cx, JSObject *obj,
jsval id, uintN flags,
JSObject **objp)
@ -8484,7 +8484,7 @@ nsHTMLDocumentSH::DocumentAllHelperNewResolve(JSContext *cx, JSObject *obj,
}
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLDocumentSH::DocumentAllTagsNewResolve(JSContext *cx, JSObject *obj,
jsval id, uintN flags,
JSObject **objp)
@ -8695,7 +8695,7 @@ nsHTMLDocumentSH::GetProperty(nsIXPConnectWrappedNative *wrapper,
// HTMLElement helper
// static
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLElementSH::ScrollIntoView(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval)
{
@ -9712,7 +9712,7 @@ nsHTMLOptionsCollectionSH::NewResolve(nsIXPConnectWrappedNative *wrapper,
return nsHTMLCollectionSH::NewResolve(wrapper, cx, obj, id, flags, objp, _retval);
}
JSBool JS_DLL_CALLBACK
JSBool
nsHTMLOptionsCollectionSH::Add(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval)
{

Просмотреть файл

@ -365,10 +365,8 @@ protected:
return PR_FALSE;
}
static JSBool JS_DLL_CALLBACK AddEventListenerHelper(JSContext *cx,
JSObject *obj,
uintN argc, jsval *argv,
jsval *rval);
static JSBool AddEventListenerHelper(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *rval);
nsresult RegisterCompileHandler(nsIXPConnectWrappedNative *wrapper,
JSContext *cx, JSObject *obj, jsval id,
@ -454,18 +452,13 @@ public:
NS_IMETHOD InnerObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
JSObject * obj, JSObject * *_retval);
static JSBool JS_DLL_CALLBACK GlobalScopePolluterNewResolve(JSContext *cx,
JSObject *obj,
jsval id,
uintN flags,
JSObject **objp);
static JSBool JS_DLL_CALLBACK GlobalScopePolluterGetProperty(JSContext *cx,
JSObject *obj,
jsval id,
jsval *vp);
static JSBool JS_DLL_CALLBACK SecurityCheckOnSetProp(JSContext *cx,
JSObject *obj, jsval id,
jsval *vp);
static JSBool GlobalScopePolluterNewResolve(JSContext *cx, JSObject *obj,
jsval id, uintN flags,
JSObject **objp);
static JSBool GlobalScopePolluterGetProperty(JSContext *cx, JSObject *obj,
jsval id, jsval *vp);
static JSBool SecurityCheckOnSetProp(JSContext *cx, JSObject *obj, jsval id,
jsval *vp);
static void InvalidateGlobalScopePolluter(JSContext *cx, JSObject *obj);
static nsresult InstallGlobalScopePolluter(JSContext *cx, JSObject *obj,
nsIHTMLDocument *doc);
@ -845,39 +838,28 @@ protected:
static nsresult ResolveImpl(JSContext *cx,
nsIXPConnectWrappedNative *wrapper, jsval id,
nsISupports **result);
static JSBool JS_DLL_CALLBACK DocumentOpen(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv,
jsval *rval);
static JSBool DocumentOpen(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval);
static JSBool GetDocumentAllNodeList(JSContext *cx, JSObject *obj,
nsIDOMDocument *doc,
nsIDOMNodeList **nodeList);
public:
static JSBool JS_DLL_CALLBACK DocumentAllGetProperty(JSContext *cx,
JSObject *obj, jsval id,
jsval *vp);
static JSBool JS_DLL_CALLBACK DocumentAllNewResolve(JSContext *cx,
JSObject *obj, jsval id,
uintN flags,
JSObject **objp);
static void JS_DLL_CALLBACK ReleaseDocument(JSContext *cx, JSObject *obj);
static JSBool JS_DLL_CALLBACK CallToGetPropMapper(JSContext *cx,
JSObject *obj, uintN argc,
jsval *argv, jsval *rval);
static JSBool JS_DLL_CALLBACK DocumentAllHelperGetProperty(JSContext *cx,
JSObject *obj,
jsval id,
jsval *vp);
static JSBool JS_DLL_CALLBACK DocumentAllHelperNewResolve(JSContext *cx,
JSObject *obj,
jsval id,
uintN flags,
JSObject **objp);
static JSBool JS_DLL_CALLBACK DocumentAllTagsNewResolve(JSContext *cx,
JSObject *obj,
jsval id,
uintN flags,
JSObject **objp);
static JSBool DocumentAllGetProperty(JSContext *cx, JSObject *obj, jsval id,
jsval *vp);
static JSBool DocumentAllNewResolve(JSContext *cx, JSObject *obj, jsval id,
uintN flags, JSObject **objp);
static void ReleaseDocument(JSContext *cx, JSObject *obj);
static JSBool CallToGetPropMapper(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval);
static JSBool DocumentAllHelperGetProperty(JSContext *cx, JSObject *obj,
jsval id, jsval *vp);
static JSBool DocumentAllHelperNewResolve(JSContext *cx, JSObject *obj,
jsval id, uintN flags,
JSObject **objp);
static JSBool DocumentAllTagsNewResolve(JSContext *cx, JSObject *obj,
jsval id, uintN flags,
JSObject **objp);
NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
JSObject *obj, jsval id, PRUint32 flags,
@ -905,9 +887,8 @@ protected:
{
}
static JSBool JS_DLL_CALLBACK ScrollIntoView(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv,
jsval *rval);
static JSBool ScrollIntoView(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval);
public:
NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
@ -1053,8 +1034,8 @@ protected:
{
}
static JSBool JS_DLL_CALLBACK Add(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval);
static JSBool Add(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
public:
NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,

Просмотреть файл

@ -418,7 +418,7 @@ NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal,
// it has not been done is that the code below only fills the error event
// after it has a good nsPresContext - whereas using the above function
// would involve always filling it. Is that a concern?
void JS_DLL_CALLBACK
void
NS_ScriptErrorReporter(JSContext *cx,
const char *message,
JSErrorReport *report)
@ -606,7 +606,7 @@ NS_ScriptErrorReporter(JSContext *cx,
#endif
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
LocaleToUnicode(JSContext *cx, char *src, jsval *rval)
{
nsresult rv;
@ -699,19 +699,19 @@ ChangeCase(JSContext *cx, JSString *src, jsval *rval,
return JS_TRUE;
}
static JSBool JS_DLL_CALLBACK
static JSBool
LocaleToUpperCase(JSContext *cx, JSString *src, jsval *rval)
{
return ChangeCase(cx, src, rval, ToUpperCase);
}
static JSBool JS_DLL_CALLBACK
static JSBool
LocaleToLowerCase(JSContext *cx, JSString *src, jsval *rval)
{
return ChangeCase(cx, src, rval, ToLowerCase);
}
static JSBool JS_DLL_CALLBACK
static JSBool
LocaleCompare(JSContext *cx, JSString *src1, JSString *src2, jsval *rval)
{
nsresult rv;
@ -870,7 +870,7 @@ GetPromptFromContext(nsJSContext* ctx)
return prompt;
}
JSBool JS_DLL_CALLBACK
JSBool
nsJSContext::DOMOperationCallback(JSContext *cx)
{
nsresult rv;
@ -2884,7 +2884,7 @@ static JSPropertySpec OptionsProperties[] = {
{0}
};
static JSBool JS_DLL_CALLBACK
static JSBool
GetOptionsProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
if (JSVAL_IS_INT(id)) {
@ -2895,7 +2895,7 @@ GetOptionsProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return JS_TRUE;
}
static JSBool JS_DLL_CALLBACK
static JSBool
SetOptionsProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
if (JSVAL_IS_INT(id)) {
@ -3574,7 +3574,7 @@ nsJSContext::FireGCTimer(PRBool aLoadInProgress)
first = PR_FALSE;
}
static JSBool JS_DLL_CALLBACK
static JSBool
DOMGCCallback(JSContext *cx, JSGCStatus status)
{
JSBool result = gOldJSGCCallback ? gOldJSGCCallback(cx, status) : JS_TRUE;
@ -3730,7 +3730,7 @@ ReportAllJSExceptionsPrefChangedCallback(const char* aPrefName, void* aClosure)
return 0;
}
JS_STATIC_DLL_CALLBACK(JSPrincipals *)
static JSPrincipals *
ObjectPrincipalFinder(JSContext *cx, JSObject *obj)
{
if (!sSecurityManager)

Просмотреть файл

@ -294,7 +294,7 @@ private:
static int PR_CALLBACK JSOptionChangedCallback(const char *pref, void *data);
static JSBool JS_DLL_CALLBACK DOMOperationCallback(JSContext *cx);
static JSBool DOMOperationCallback(JSContext *cx);
};
class nsIJSRuntimeService;
@ -357,6 +357,6 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIJSArgArray, NS_IJSARGARRAY_IID)
nsresult NS_CreateJSRuntime(nsIScriptRuntime **aRuntime);
/* prototypes */
void JS_DLL_CALLBACK NS_ScriptErrorReporter(JSContext *cx, const char *message, JSErrorReport *report);
void NS_ScriptErrorReporter(JSContext *cx, const char *message, JSErrorReport *report);
#endif /* nsJSEnvironment_h___ */

Просмотреть файл

@ -724,7 +724,7 @@ NS_NewJSON(nsISupports* aOuter, REFNSIID aIID, void** aResult)
}
JS_STATIC_DLL_CALLBACK(void)
static void
trace_json_stack(JSTracer *trc, JSTempValueRooter *tvr)
{
nsJSONObjectStack *tmp = static_cast<nsJSONObjectStack *>(tvr);

Просмотреть файл

@ -376,7 +376,7 @@ protected:
* JS environment function and callbacks
*/
JSBool JS_DLL_CALLBACK
JSBool
DOMWorkerOperationCallback(JSContext* aCx)
{
nsDOMWorkerThread* worker = (nsDOMWorkerThread*)JS_GetContextPrivate(aCx);
@ -452,7 +452,7 @@ DOMWorkerOperationCallback(JSContext* aCx)
return JS_TRUE;
}
void JS_DLL_CALLBACK
void
DOMWorkerErrorReporter(JSContext* aCx,
const char* aMessage,
JSErrorReport* aReport)

Просмотреть файл

@ -100,7 +100,7 @@ private:
jsval* aArgv, jsval* aRval, PRBool aIsInterval);
};
JSBool JS_DLL_CALLBACK
JSBool
nsDOMWorkerFunctions::Dump(JSContext* aCx,
JSObject* /* aObj */,
uintN aArgc,
@ -118,7 +118,7 @@ nsDOMWorkerFunctions::Dump(JSContext* aCx,
return JS_TRUE;
}
JSBool JS_DLL_CALLBACK
JSBool
nsDOMWorkerFunctions::DebugDump(JSContext* aCx,
JSObject* aObj,
uintN aArgc,
@ -132,7 +132,7 @@ nsDOMWorkerFunctions::DebugDump(JSContext* aCx,
#endif
}
JSBool JS_DLL_CALLBACK
JSBool
nsDOMWorkerFunctions::PostMessage(JSContext* aCx,
JSObject* /* aObj */,
uintN aArgc,
@ -164,7 +164,7 @@ nsDOMWorkerFunctions::PostMessage(JSContext* aCx,
return JS_TRUE;
}
JSBool JS_DLL_CALLBACK
JSBool
nsDOMWorkerFunctions::MakeTimeout(JSContext* aCx,
JSObject* /* aObj */,
uintN aArgc,
@ -195,7 +195,7 @@ nsDOMWorkerFunctions::MakeTimeout(JSContext* aCx,
return JS_TRUE;
}
JSBool JS_DLL_CALLBACK
JSBool
nsDOMWorkerFunctions::KillTimeout(JSContext* aCx,
JSObject* /* aObj */,
uintN aArgc,

Просмотреть файл

@ -111,7 +111,7 @@ PRBool GetJSShGlobal(JSContext *cx, JSObject *obj, nsJSSh** shell)
return PR_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
{
// xxx getting the global obj from the cx. will that give us grief?
@ -132,7 +132,7 @@ my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -168,7 +168,7 @@ Print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Quit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -183,7 +183,7 @@ Quit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -203,7 +203,7 @@ Load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
FlushEventQueue(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -214,7 +214,7 @@ FlushEventQueue(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rv
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Suspend(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -232,7 +232,7 @@ Suspend(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Resume(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -243,7 +243,7 @@ Resume(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
AddressOf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
if (argc!=1) return JS_FALSE;
@ -266,7 +266,7 @@ AddressOf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
SetProtocol(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
if (argc!=1) return JS_FALSE;
@ -299,7 +299,7 @@ SetProtocol(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
GetProtocol(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -312,7 +312,7 @@ GetProtocol(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
SetContextObj(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -338,7 +338,7 @@ SetContextObj(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
DebugBreak(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -349,7 +349,7 @@ DebugBreak(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
GetInputStream(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;
@ -381,7 +381,7 @@ GetInputStream(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rva
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
GetOutputStream(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsJSSh* shell;

Просмотреть файл

@ -113,7 +113,7 @@ static JSClass global_class = {
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub
};
JS_STATIC_DLL_CALLBACK(void)
static void
autoConfigErrorReporter(JSContext *cx, const char *message,
JSErrorReport *report)
{

Просмотреть файл

@ -372,7 +372,7 @@ jsd_GetErrorReporter(JSDContext* jsdc,
JSD_ErrorReporter* reporter,
void** callerdata);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
jsd_DebugErrorHook(JSContext *cx, const char *message,
JSErrorReport *report, void *closure);
@ -467,7 +467,7 @@ jsd_GetClosestPC(JSDContext* jsdc, JSDScript* jsdscript, uintN line);
extern uintN
jsd_GetClosestLine(JSDContext* jsdc, JSDScript* jsdscript, jsuword pc);
extern void JS_DLL_CALLBACK
extern void
jsd_NewScriptHookProc(
JSContext *cx,
const char *filename, /* URL this script loads from */
@ -476,7 +476,7 @@ jsd_NewScriptHookProc(
JSFunction *fun,
void* callerdata);
extern void JS_DLL_CALLBACK
extern void
jsd_DestroyScriptHookProc(
JSContext *cx,
JSScript *script,
@ -634,11 +634,11 @@ jsd_SetThrowHook(JSDContext* jsdc,
extern JSBool
jsd_ClearThrowHook(JSDContext* jsdc);
extern JSTrapStatus JS_DLL_CALLBACK
extern JSTrapStatus
jsd_DebuggerHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
jsval *rval, void *closure);
extern JSTrapStatus JS_DLL_CALLBACK
extern JSTrapStatus
jsd_ThrowHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
jsval *rval, void *closure);
@ -1009,11 +1009,11 @@ jsd_GetPropertyVarArgSlot(JSDContext* jsdc, JSDProperty* jsdprop);
/**************************************************/
/* Stepping Functions */
extern void * JS_DLL_CALLBACK
extern void *
jsd_FunctionCallHook(JSContext *cx, JSStackFrame *fp, JSBool before,
JSBool *ok, void *closure);
extern void * JS_DLL_CALLBACK
extern void *
jsd_TopLevelCallHook(JSContext *cx, JSStackFrame *fp, JSBool before,
JSBool *ok, void *closure);
@ -1026,7 +1026,7 @@ jsd_InitObjectManager(JSDContext* jsdc);
extern void
jsd_DestroyObjectManager(JSDContext* jsdc);
extern void JS_DLL_CALLBACK
extern void
jsd_ObjectHook(JSContext *cx, JSObject *obj, JSBool isNew, void *closure);
extern void
@ -1117,7 +1117,7 @@ jsdlw_ProcessedToRawLineNumber(JSDContext* jsdc, JSDScript* jsdscript,
#if 0
/* our hook proc for LiveWire app start/stop */
extern void JS_DLL_CALLBACK
extern void
jsdlw_AppHookProc(LWDBGApp* app,
JSBool created,
void *callerdata);

Просмотреть файл

@ -67,7 +67,7 @@ _testAtoms(JSDContext*jsdc)
}
#endif
JS_STATIC_DLL_CALLBACK(intN)
static intN
_atom_smasher(JSHashEntry *he, intN i, void *arg)
{
JS_ASSERT(he);
@ -81,13 +81,13 @@ _atom_smasher(JSHashEntry *he, intN i, void *arg)
return HT_ENUMERATE_NEXT;
}
JS_STATIC_DLL_CALLBACK(intN)
static intN
_compareAtomKeys(const void *v1, const void *v2)
{
return 0 == strcmp((const char*)v1, (const char*)v2);
}
JS_STATIC_DLL_CALLBACK(intN)
static intN
_compareAtoms(const void *v1, const void *v2)
{
return 0 == strcmp(((JSDAtom*)v1)->str, ((JSDAtom*)v2)->str);

Просмотреть файл

@ -324,7 +324,7 @@ jsd_JSDContextForJSContext(JSContext* context)
return jsdc;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
jsd_DebugErrorHook(JSContext *cx, const char *message,
JSErrorReport *report, void *closure)
{

Просмотреть файл

@ -41,7 +41,7 @@
#include "jsd.h"
JSTrapStatus JS_DLL_CALLBACK
JSTrapStatus
jsd_InterruptHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval,
void *closure)
{
@ -80,7 +80,7 @@ jsd_InterruptHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rva
hook, hookData, rval);
}
JSTrapStatus JS_DLL_CALLBACK
JSTrapStatus
jsd_DebuggerHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
jsval *rval, void *closure)
{
@ -114,7 +114,7 @@ jsd_DebuggerHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
}
JSTrapStatus JS_DLL_CALLBACK
JSTrapStatus
jsd_ThrowHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
jsval *rval, void *closure)
{

Просмотреть файл

@ -156,7 +156,7 @@ _createJSDObject(JSDContext* jsdc, JSContext *cx, JSObject *obj)
return jsdobj;
}
void JS_DLL_CALLBACK
void
jsd_ObjectHook(JSContext *cx, JSObject *obj, JSBool isNew, void *closure)
{
JSDObject* jsdobj;
@ -220,7 +220,7 @@ jsd_Constructing(JSDContext* jsdc, JSContext *cx, JSObject *obj,
JSD_UNLOCK_OBJECTS(jsdc);
}
JS_STATIC_DLL_CALLBACK(JSHashNumber)
static JSHashNumber
_hash_root(const void *key)
{
return ((JSHashNumber) key) >> 2; /* help lame MSVC1.5 on Win16 */

Просмотреть файл

@ -216,31 +216,31 @@ _dumpJSDScriptList( JSDContext* jsdc )
#endif /* JSD_DUMP */
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSHashNumber)
static JSHashNumber
jsd_hash_script(const void *key)
{
return ((JSHashNumber) key) >> 2; /* help lame MSVC1.5 on Win16 */
}
JS_STATIC_DLL_CALLBACK(void *)
static void *
jsd_alloc_script_table(void *priv, size_t size)
{
return malloc(size);
}
JS_STATIC_DLL_CALLBACK(void)
static void
jsd_free_script_table(void *priv, void *item)
{
free(item);
}
JS_STATIC_DLL_CALLBACK(JSHashEntry *)
static JSHashEntry *
jsd_alloc_script_entry(void *priv, const void *item)
{
return (JSHashEntry*) malloc(sizeof(JSHashEntry));
}
JS_STATIC_DLL_CALLBACK(void)
static void
jsd_free_script_entry(void *priv, JSHashEntry *he, uintN flag)
{
if (flag == HT_FREE_ENTRY)
@ -544,7 +544,7 @@ jsd_GetScriptHook(JSDContext* jsdc, JSD_ScriptHookProc* hook, void** callerdata)
/***************************************************************************/
void JS_DLL_CALLBACK
void
jsd_NewScriptHookProc(
JSContext *cx,
const char *filename, /* URL this script loads from */
@ -591,7 +591,7 @@ jsd_NewScriptHookProc(
hook(jsdc, jsdscript, JS_TRUE, hookData);
}
void JS_DLL_CALLBACK
void
jsd_DestroyScriptHookProc(
JSContext *cx,
JSScript *script,
@ -691,7 +691,7 @@ _isActiveHook(JSDContext* jsdc, JSScript *script, JSDExecHook* jsdhook)
}
JSTrapStatus JS_DLL_CALLBACK
JSTrapStatus
jsd_TrapHandler(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval,
void *closure)
{

Просмотреть файл

@ -266,7 +266,7 @@ _callHook(JSDContext *jsdc, JSContext *cx, JSStackFrame *fp, JSBool before,
}
void * JS_DLL_CALLBACK
void *
jsd_FunctionCallHook(JSContext *cx, JSStackFrame *fp, JSBool before,
JSBool *ok, void *closure)
{
@ -292,7 +292,7 @@ jsd_FunctionCallHook(JSContext *cx, JSStackFrame *fp, JSBool before,
return NULL;
}
void * JS_DLL_CALLBACK
void *
jsd_TopLevelCallHook(JSContext *cx, JSStackFrame *fp, JSBool before,
JSBool *ok, void *closure)
{

Просмотреть файл

@ -108,7 +108,7 @@
#define JSD_AUTOREG_ENTRY "JSDebugger Startup Observer"
#define JSD_STARTUP_ENTRY "JSDebugger Startup Observer"
JS_STATIC_DLL_CALLBACK (JSBool)
static JSBool
jsds_GCCallbackProc (JSContext *cx, JSGCStatus status);
/*******************************************************************************
@ -461,7 +461,7 @@ jsds_FilterHook (JSDContext *jsdc, JSDThreadState *state)
* c callbacks
*******************************************************************************/
JS_STATIC_DLL_CALLBACK (void)
static void
jsds_NotifyPendingDeadScripts (JSContext *cx)
{
#ifdef CAUTIOUS_SCRIPTHOOK
@ -513,7 +513,7 @@ jsds_NotifyPendingDeadScripts (JSContext *cx)
}
}
JS_STATIC_DLL_CALLBACK (JSBool)
static JSBool
jsds_GCCallbackProc (JSContext *cx, JSGCStatus status)
{
#ifdef DEBUG_verbose
@ -533,7 +533,7 @@ jsds_GCCallbackProc (JSContext *cx, JSGCStatus status)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK (uintN)
static uintN
jsds_ErrorHookProc (JSDContext *jsdc, JSContext *cx, const char *message,
JSErrorReport *report, void *callerdata)
{
@ -590,7 +590,7 @@ jsds_ErrorHookProc (JSDContext *jsdc, JSContext *cx, const char *message,
return JSD_ERROR_REPORTER_PASS_ALONG;
}
JS_STATIC_DLL_CALLBACK (JSBool)
static JSBool
jsds_CallHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate,
uintN type, void* callerdata)
{
@ -630,7 +630,7 @@ jsds_CallHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK (PRUint32)
static PRUint32
jsds_ExecutionHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate,
uintN type, void* callerdata, jsval* rval)
{
@ -706,7 +706,7 @@ jsds_ExecutionHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate,
return hook_rv;
}
JS_STATIC_DLL_CALLBACK (void)
static void
jsds_ScriptHookProc (JSDContext* jsdc, JSDScript* jsdscript, JSBool creating,
void* callerdata)
{

Просмотреть файл

@ -108,7 +108,7 @@ typedef struct JSDObject JSDObject;
* up the JSD system.
*/
typedef void
(* JS_DLL_CALLBACK JSD_SetContextProc)(JSDContext* jsdc, void* user);
(* JSD_SetContextProc)(JSDContext* jsdc, void* user);
/* This struct could have more fields in future versions */
typedef struct
@ -434,10 +434,10 @@ JSD_GetScriptLineExtent(JSDContext* jsdc, JSDScript *jsdscript);
* 'callerdata' is what was passed to JSD_SetScriptHook to set the hook.
*/
typedef void
(* JS_DLL_CALLBACK JSD_ScriptHookProc)(JSDContext* jsdc,
JSDScript* jsdscript,
JSBool creating,
void* callerdata);
(* JSD_ScriptHookProc)(JSDContext* jsdc,
JSDScript* jsdscript,
JSBool creating,
void* callerdata);
/*
* Set a hook to be called when scripts are created or destroyed (loaded or
@ -713,11 +713,11 @@ JSD_AddFullSourceText(JSDContext* jsdc,
* Implement a callback of this form in order to hook execution.
*/
typedef uintN
(* JS_DLL_CALLBACK JSD_ExecutionHookProc)(JSDContext* jsdc,
JSDThreadState* jsdthreadstate,
uintN type,
void* callerdata,
jsval* rval);
(* JSD_ExecutionHookProc)(JSDContext* jsdc,
JSDThreadState* jsdthreadstate,
uintN type,
void* callerdata,
jsval* rval);
/* possible 'type' params for JSD_CallHookProc */
#define JSD_HOOK_TOPLEVEL_START 0 /* about to evaluate top level script */
@ -732,10 +732,10 @@ typedef uintN
* ignored to TOPLEVEL_END and FUNCTION_RETURN type hooks.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSD_CallHookProc)(JSDContext* jsdc,
JSDThreadState* jsdthreadstate,
uintN type,
void* callerdata);
(* JSD_CallHookProc)(JSDContext* jsdc,
JSDThreadState* jsdthreadstate,
uintN type,
void* callerdata);
/*
* Set Hook to be called whenever the given pc is about to be executed --
@ -1050,11 +1050,11 @@ JSD_SetException(JSDContext* jsdc, JSDThreadState* jsdthreadstate,
* Implement a callback of this form in order to hook the ErrorReporter
*/
typedef uintN
(* JS_DLL_CALLBACK JSD_ErrorReporter)(JSDContext* jsdc,
JSContext* cx,
const char* message,
JSErrorReport* report,
void* callerdata);
(* JSD_ErrorReporter)(JSDContext* jsdc,
JSContext* cx,
const char* message,
JSErrorReport* report,
void* callerdata);
/* Set ErrorReporter hook */
extern JSD_PUBLIC_API(JSBool)

Просмотреть файл

@ -2121,7 +2121,7 @@ split_create_inner(JSContext *cx, JSObject *outer);
static ComplexObject *
split_get_private(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
split_addProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
ComplexObject *cpx;
@ -2140,7 +2140,7 @@ split_addProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
split_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
ComplexObject *cpx;
@ -2164,7 +2164,7 @@ split_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
split_setProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
ComplexObject *cpx;
@ -2188,7 +2188,7 @@ split_setProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
split_delProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
ComplexObject *cpx;
@ -2206,7 +2206,7 @@ split_delProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
split_enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp)
{
@ -2247,7 +2247,7 @@ split_enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
split_resolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp)
{
@ -2289,13 +2289,13 @@ split_resolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
split_finalize(JSContext *cx, JSObject *obj)
{
JS_free(cx, JS_GetPrivate(cx, obj));
}
JS_STATIC_DLL_CALLBACK(uint32)
static uint32
split_mark(JSContext *cx, JSObject *obj, void *arg)
{
ComplexObject *cpx;
@ -2310,7 +2310,7 @@ split_mark(JSContext *cx, JSObject *obj, void *arg)
return 0;
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
split_outerObject(JSContext *cx, JSObject *obj)
{
ComplexObject *cpx;
@ -2319,7 +2319,7 @@ split_outerObject(JSContext *cx, JSObject *obj)
return cpx->isInner ? cpx->outer : obj;
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
split_innerObject(JSContext *cx, JSObject *obj)
{
ComplexObject *cpx;

Просмотреть файл

@ -4311,7 +4311,7 @@ JS_ObjectIsFunction(JSContext *cx, JSObject *obj)
}
JS_BEGIN_EXTERN_C
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
js_generic_fast_native_method_dispatcher(JSContext *cx, uintN argc, jsval *vp)
{
jsval fsv;
@ -4364,7 +4364,7 @@ js_generic_fast_native_method_dispatcher(JSContext *cx, uintN argc, jsval *vp)
return ((JSFastNative) fs->call)(cx, argc, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
js_generic_native_method_dispatcher(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *rval)
{

Просмотреть файл

@ -891,7 +891,7 @@ JS_DumpNamedRoots(JSRuntime *rt,
#define JS_MAP_GCROOT_REMOVE 2 /* remove and free the current entry */
typedef intN
(* JS_DLL_CALLBACK JSGCRootMapFun)(void *rp, const char *name, void *data);
(* JSGCRootMapFun)(void *rp, const char *name, void *data);
extern JS_PUBLIC_API(uint32)
JS_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data);
@ -1809,14 +1809,14 @@ struct JSPrincipals {
char *codebase;
/* XXX unspecified and unused by Mozilla code -- can we remove these? */
void * (* JS_DLL_CALLBACK getPrincipalArray)(JSContext *cx, JSPrincipals *);
JSBool (* JS_DLL_CALLBACK globalPrivilegesEnabled)(JSContext *cx, JSPrincipals *);
void * (* getPrincipalArray)(JSContext *cx, JSPrincipals *);
JSBool (* globalPrivilegesEnabled)(JSContext *cx, JSPrincipals *);
/* Don't call "destroy"; use reference counting macros below. */
jsrefcount refcount;
void (* JS_DLL_CALLBACK destroy)(JSContext *cx, JSPrincipals *);
JSBool (* JS_DLL_CALLBACK subsume)(JSPrincipals *, JSPrincipals *);
void (* destroy)(JSContext *cx, JSPrincipals *);
JSBool (* subsume)(JSPrincipals *, JSPrincipals *);
};
#ifdef JS_THREADSAFE

Просмотреть файл

@ -241,16 +241,16 @@ JS_STATIC_ASSERT(ATOM_ENTRY_FLAG_MASK < JSVAL_ALIGN);
#define CLEAR_ATOM_ENTRY_FLAGS(entry, flags) \
((void)((entry)->keyAndFlags &= ~(jsuword)(flags)))
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
static JSDHashNumber
HashDouble(JSDHashTable *table, const void *key);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
MatchDouble(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key);
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
static JSDHashNumber
HashString(JSDHashTable *table, const void *key);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
MatchString(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key);
static const JSDHashTableOps DoubleHashOps = {
@ -280,7 +280,7 @@ static const JSDHashTableOps StringHashOps = {
#define IS_INITIALIZED_STATE(state) IS_DOUBLE_TABLE(&(state)->doubleAtoms)
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
static JSDHashNumber
HashDouble(JSDHashTable *table, const void *key)
{
jsdouble d;
@ -290,14 +290,14 @@ HashDouble(JSDHashTable *table, const void *key)
return JSDOUBLE_HI32(d) ^ JSDOUBLE_LO32(d);
}
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
static JSDHashNumber
HashString(JSDHashTable *table, const void *key)
{
JS_ASSERT(IS_STRING_TABLE(table));
return js_HashString((JSString *)key);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
MatchDouble(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key)
{
JSAtomHashEntry *entry = TO_ATOM_ENTRY(hdr);
@ -321,7 +321,7 @@ MatchDouble(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key)
return d1 == d2;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
MatchString(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key)
{
JSAtomHashEntry *entry = TO_ATOM_ENTRY(hdr);
@ -390,7 +390,7 @@ js_InitAtomState(JSRuntime *rt)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_string_uninterner(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -456,7 +456,7 @@ js_InitCommonAtoms(JSContext *cx)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_atom_unpinner(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -477,7 +477,7 @@ js_FinishCommonAtoms(JSContext *cx)
#endif
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_locked_atom_tracer(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -494,7 +494,7 @@ js_locked_atom_tracer(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_pinned_atom_tracer(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -528,7 +528,7 @@ js_TraceAtomState(JSTracer *trc, JSBool allAtoms)
}
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_atom_sweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -832,7 +832,7 @@ js_ValueToStringId(JSContext *cx, jsval v, jsid *idp)
#ifdef DEBUG
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
atom_dumper(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -886,14 +886,14 @@ js_DumpAtoms(JSContext *cx, FILE *fp)
#endif
JS_STATIC_DLL_CALLBACK(JSHashNumber)
static JSHashNumber
js_hash_atom_ptr(const void *key)
{
const JSAtom *atom = (const JSAtom *) key;
return ATOM_HASH(atom);
}
JS_STATIC_DLL_CALLBACK(void *)
static void *
js_alloc_temp_space(void *priv, size_t size)
{
JSContext *cx = (JSContext *) priv;
@ -905,12 +905,12 @@ js_alloc_temp_space(void *priv, size_t size)
return space;
}
JS_STATIC_DLL_CALLBACK(void)
static void
js_free_temp_space(void *priv, void *item)
{
}
JS_STATIC_DLL_CALLBACK(JSHashEntry *)
static JSHashEntry *
js_alloc_temp_entry(void *priv, const void *key)
{
JSContext *cx = (JSContext *) priv;
@ -924,7 +924,7 @@ js_alloc_temp_entry(void *priv, const void *key)
return &ale->entry;
}
JS_STATIC_DLL_CALLBACK(void)
static void
js_free_temp_entry(void *priv, JSHashEntry *he, uintN flag)
{
}
@ -996,7 +996,7 @@ js_IndexAtom(JSContext *cx, JSAtom *atom, JSAtomList *al)
return ale;
}
JS_STATIC_DLL_CALLBACK(intN)
static intN
js_map_atom(JSHashEntry *he, intN i, void *arg)
{
JSAtomListElement *ale = (JSAtomListElement *)he;

Просмотреть файл

@ -82,7 +82,7 @@ static JSBool tpIndexInited = JS_FALSE;
JS_BEGIN_EXTERN_C
JSBool
js_InitThreadPrivateIndex(void (JS_DLL_CALLBACK *ptr)(void *))
js_InitThreadPrivateIndex(void (*ptr)(void *))
{
PRStatus status;
@ -101,7 +101,7 @@ JS_END_EXTERN_C
* Callback function to delete a JSThread info when the thread that owns it
* is destroyed.
*/
void JS_DLL_CALLBACK
void
js_ThreadDestructorCB(void *ptr)
{
JSThread *thread = (JSThread *)ptr;
@ -521,7 +521,7 @@ js_ContextIterator(JSRuntime *rt, JSBool unlocked, JSContext **iterp)
return cx;
}
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
static JSDHashNumber
resolving_HashKey(JSDHashTable *table, const void *ptr)
{
const JSResolvingKey *key = (const JSResolvingKey *)ptr;

Просмотреть файл

@ -193,7 +193,7 @@ struct JSThread {
#define JS_TRACE_MONITOR(cx) ((cx)->thread->traceMonitor)
#define JS_SCRIPTS_TO_GC(cx) ((cx)->thread->scriptsToGC)
extern void JS_DLL_CALLBACK
extern void
js_ThreadDestructorCB(void *ptr);
extern JSBool
@ -966,7 +966,7 @@ class JSAutoTempValueRooter
* success.
*/
extern JSBool
js_InitThreadPrivateIndex(void (JS_DLL_CALLBACK *ptr)(void *));
js_InitThreadPrivateIndex(void (*ptr)(void *));
/*
* Common subroutine of JS_SetVersion and js_SetVersion, to update per-context

Просмотреть файл

@ -530,7 +530,7 @@ js_GetWatchedSetter(JSRuntime *rt, JSScope *scope,
return setter;
}
JSBool JS_DLL_CALLBACK
JSBool
js_watch_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
JSRuntime *rt;
@ -674,7 +674,7 @@ js_watch_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return JS_TRUE;
}
JSBool JS_DLL_CALLBACK
JSBool
js_watch_set_wrapper(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{

Просмотреть файл

@ -120,10 +120,10 @@ extern JSPropertyOp
js_GetWatchedSetter(JSRuntime *rt, JSScope *scope,
const JSScopeProperty *sprop);
extern JSBool JS_DLL_CALLBACK
extern JSBool
js_watch_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
extern JSBool JS_DLL_CALLBACK
extern JSBool
js_watch_set_wrapper(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);

Просмотреть файл

@ -238,26 +238,25 @@ struct JSDHashTable {
* equal to 0; but note that jsdhash.c code will never call with 0 nbytes).
*/
typedef void *
(* JS_DLL_CALLBACK JSDHashAllocTable)(JSDHashTable *table, uint32 nbytes);
(* JSDHashAllocTable)(JSDHashTable *table, uint32 nbytes);
typedef void
(* JS_DLL_CALLBACK JSDHashFreeTable) (JSDHashTable *table, void *ptr);
(* JSDHashFreeTable) (JSDHashTable *table, void *ptr);
/*
* Compute the hash code for a given key to be looked up, added, or removed
* from table. A hash code may have any JSDHashNumber value.
*/
typedef JSDHashNumber
(* JS_DLL_CALLBACK JSDHashHashKey) (JSDHashTable *table, const void *key);
(* JSDHashHashKey) (JSDHashTable *table, const void *key);
/*
* Compare the key identifying entry in table with the provided key parameter.
* Return JS_TRUE if keys match, JS_FALSE otherwise.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSDHashMatchEntry)(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key);
(* JSDHashMatchEntry)(JSDHashTable *table, const JSDHashEntryHdr *entry,
const void *key);
/*
* Copy the data starting at from to the new entry storage at to. Do not add
@ -266,9 +265,8 @@ typedef JSBool
* any reference-decrementing callback shortly.
*/
typedef void
(* JS_DLL_CALLBACK JSDHashMoveEntry)(JSDHashTable *table,
const JSDHashEntryHdr *from,
JSDHashEntryHdr *to);
(* JSDHashMoveEntry)(JSDHashTable *table, const JSDHashEntryHdr *from,
JSDHashEntryHdr *to);
/*
* Clear the entry and drop any strong references it holds. This callback is
@ -276,8 +274,7 @@ typedef void
* but only if the given key is found in the table.
*/
typedef void
(* JS_DLL_CALLBACK JSDHashClearEntry)(JSDHashTable *table,
JSDHashEntryHdr *entry);
(* JSDHashClearEntry)(JSDHashTable *table, JSDHashEntryHdr *entry);
/*
* Called when a table (whether allocated dynamically by itself, or nested in
@ -285,7 +282,7 @@ typedef void
* allows table->ops-specific code to finalize table->data.
*/
typedef void
(* JS_DLL_CALLBACK JSDHashFinalize) (JSDHashTable *table);
(* JSDHashFinalize) (JSDHashTable *table);
/*
* Initialize a new entry, apart from keyHash. This function is called when
@ -295,9 +292,8 @@ typedef void
* table.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSDHashInitEntry)(JSDHashTable *table,
JSDHashEntryHdr *entry,
const void *key);
(* JSDHashInitEntry)(JSDHashTable *table, JSDHashEntryHdr *entry,
const void *key);
/*
* Finally, the "vtable" structure for JSDHashTable. The first eight hooks
@ -574,8 +570,8 @@ JS_DHashTableRawRemove(JSDHashTable *table, JSDHashEntryHdr *entry);
* the entry being enumerated, rather than returning JS_DHASH_REMOVE.
*/
typedef JSDHashOperator
(* JS_DLL_CALLBACK JSDHashEnumerator)(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg);
(* JSDHashEnumerator)(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
void *arg);
extern JS_PUBLIC_API(uint32)
JS_DHashTableEnumerate(JSDHashTable *table, JSDHashEnumerator etor, void *arg);

Просмотреть файл

@ -2529,7 +2529,7 @@ typedef struct JSLocalNameEnumeratorArgs {
#endif
} JSLocalNameEnumeratorArgs;
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
get_local_names_enumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -2609,7 +2609,7 @@ js_GetLocalNameArray(JSContext *cx, JSFunction *fun, JSArenaPool *pool)
return names;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
trace_local_names_enumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{

Просмотреть файл

@ -1510,7 +1510,7 @@ js_RemoveRoot(JSRuntime *rt, void *rp)
#ifdef DEBUG
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_root_printer(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 i, void *arg)
{
uint32 *leakedroots = (uint32 *)arg;
@ -1554,7 +1554,7 @@ typedef struct NamedRootDumpArgs {
void *data;
} NamedRootDumpArgs;
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_named_root_dumper(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
void *arg)
{
@ -1587,7 +1587,7 @@ typedef struct GCRootMapArgs {
void *data;
} GCRootMapArgs;
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_gcroot_mapper(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
void *arg)
{
@ -2594,7 +2594,7 @@ js_CallValueTracerIfGCThing(JSTracer *trc, jsval v)
JS_CallTracer(trc, thing, kind);
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
gc_root_traversal(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 num,
void *arg)
{
@ -2653,7 +2653,7 @@ gc_root_traversal(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 num,
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
gc_lock_traversal(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 num,
void *arg)
{

Просмотреть файл

@ -56,9 +56,9 @@ typedef struct JSHashTable JSHashTable;
#define JS_HASH_BITS 32
#define JS_GOLDEN_RATIO 0x9E3779B9U
typedef JSHashNumber (* JS_DLL_CALLBACK JSHashFunction)(const void *key);
typedef intN (* JS_DLL_CALLBACK JSHashComparator)(const void *v1, const void *v2);
typedef intN (* JS_DLL_CALLBACK JSHashEnumerator)(JSHashEntry *he, intN i, void *arg);
typedef JSHashNumber (* JSHashFunction)(const void *key);
typedef intN (* JSHashComparator)(const void *v1, const void *v2);
typedef intN (* JSHashEnumerator)(JSHashEntry *he, intN i, void *arg);
/* Flag bits in JSHashEnumerator's return value */
#define HT_ENUMERATE_NEXT 0 /* continue enumerating entries */

Просмотреть файл

@ -418,8 +418,6 @@ sub convert_declarations {
$line =~ s/PR_EXTERN/JS_EXTERN_API/g;
$line =~ s/PR_IMPLEMENT_DATA/JS_EXPORT_DATA/g;
$line =~ s/PR_IMPLEMENT/JS_EXPORT_API/g;
$line =~ s/PR_CALLBACK/JS_DLL_CALLBACK/g;
$line =~ s/PR_STATIC_CALLBACK/JS_STATIC_DLL_CALLBACK/g;
$line =~ s/PR_IMPORT/JS_IMPORT/g;
$line =~ s/PR_PUBLIC_API/JS_EXPORT_API/g;
$line =~ s/PR_PUBLIC_DATA/JS_EXPORT_DATA/g;

Просмотреть файл

@ -327,7 +327,7 @@ js_SetProtoOrParent(JSContext *cx, JSObject *obj, uint32 slot, JSObject *pobj)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSHashNumber)
static JSHashNumber
js_hash_object(const void *key)
{
return (JSHashNumber)JS_PTR_TO_UINT32(key) >> JSVAL_TAGBITS;
@ -570,7 +570,7 @@ js_LeaveSharpObject(JSContext *cx, JSIdArray **idap)
}
}
JS_STATIC_DLL_CALLBACK(intN)
static intN
gc_sharp_table_entry_marker(JSHashEntry *he, intN i, void *arg)
{
JS_CALL_OBJECT_TRACER((JSTracer *)arg, (JSObject *)he->key,
@ -2677,7 +2677,7 @@ earlybad:
JS_BEGIN_EXTERN_C
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
js_InitNullClass(JSContext *cx, JSObject *obj)
{
JS_ASSERT(0);

Просмотреть файл

@ -1851,7 +1851,7 @@ typedef struct FindPropValEntry {
(pnkey)->pn_type == TOK_STRING || \
(pnkey)->pn_type == TOK_NAME))
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
static JSDHashNumber
HashFindPropValKey(JSDHashTable *table, const void *key)
{
const JSParseNode *pnkey = (const JSParseNode *)key;
@ -1863,7 +1863,7 @@ HashFindPropValKey(JSDHashTable *table, const void *key)
: ATOM_HASH(pnkey->pn_atom);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
MatchFindPropValEntry(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key)

Просмотреть файл

@ -138,32 +138,31 @@ typedef enum JSTrapStatus {
} JSTrapStatus;
typedef JSTrapStatus
(* JS_DLL_CALLBACK JSTrapHandler)(JSContext *cx, JSScript *script,
jsbytecode *pc, jsval *rval, void *closure);
(* JSTrapHandler)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval,
void *closure);
typedef JSBool
(* JS_DLL_CALLBACK JSWatchPointHandler)(JSContext *cx, JSObject *obj, jsval id,
jsval old, jsval *newp, void *closure);
(* JSWatchPointHandler)(JSContext *cx, JSObject *obj, jsval id, jsval old,
jsval *newp, void *closure);
/* called just after script creation */
typedef void
(* JS_DLL_CALLBACK JSNewScriptHook)(JSContext *cx,
const char *filename, /* URL of script */
uintN lineno, /* first line */
JSScript *script,
JSFunction *fun,
void *callerdata);
(* JSNewScriptHook)(JSContext *cx,
const char *filename, /* URL of script */
uintN lineno, /* first line */
JSScript *script,
JSFunction *fun,
void *callerdata);
/* called just before script destruction */
typedef void
(* JS_DLL_CALLBACK JSDestroyScriptHook)(JSContext *cx,
JSScript *script,
void *callerdata);
(* JSDestroyScriptHook)(JSContext *cx,
JSScript *script,
void *callerdata);
typedef void
(* JS_DLL_CALLBACK JSSourceHandler)(const char *filename, uintN lineno,
jschar *str, size_t length,
void **listenerTSData, void *closure);
(* JSSourceHandler)(const char *filename, uintN lineno, jschar *str,
size_t length, void **listenerTSData, void *closure);
/*
* This hook captures high level script execution and function calls (JS or
@ -191,16 +190,15 @@ typedef void
* be called.
*/
typedef void *
(* JS_DLL_CALLBACK JSInterpreterHook)(JSContext *cx, JSStackFrame *fp, JSBool before,
JSBool *ok, void *closure);
(* JSInterpreterHook)(JSContext *cx, JSStackFrame *fp, JSBool before,
JSBool *ok, void *closure);
typedef void
(* JS_DLL_CALLBACK JSObjectHook)(JSContext *cx, JSObject *obj, JSBool isNew,
void *closure);
(* JSObjectHook)(JSContext *cx, JSObject *obj, JSBool isNew, void *closure);
typedef JSBool
(* JS_DLL_CALLBACK JSDebugErrorHook)(JSContext *cx, const char *message,
JSErrorReport *report, void *closure);
(* JSDebugErrorHook)(JSContext *cx, const char *message, JSErrorReport *report,
void *closure);
typedef struct JSDebugHooks {
JSTrapHandler interruptHandler;
@ -230,7 +228,7 @@ typedef struct JSDebugHooks {
* variables. See jscntxt.h for details.
*/
typedef void
(* JS_DLL_CALLBACK JSTempValueTrace)(JSTracer *trc, JSTempValueRooter *tvr);
(* JSTempValueTrace)(JSTracer *trc, JSTempValueRooter *tvr);
typedef union JSTempValueUnion {
jsval value;

Просмотреть файл

@ -165,8 +165,7 @@ typedef struct JSSecurityCallbacks JSSecurityCallbacks;
* obj[id] can't be deleted (because it's permanent).
*/
typedef JSBool
(* JS_DLL_CALLBACK JSPropertyOp)(JSContext *cx, JSObject *obj, jsval id,
jsval *vp);
(* JSPropertyOp)(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
/*
* This function type is used for callbacks that enumerate the properties of
@ -196,16 +195,15 @@ typedef JSBool
* indicating failure.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSNewEnumerateOp)(JSContext *cx, JSObject *obj,
JSIterateOp enum_op,
jsval *statep, jsid *idp);
(* JSNewEnumerateOp)(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp);
/*
* The old-style JSClass.enumerate op should define all lazy properties not
* yet reflected in obj.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSEnumerateOp)(JSContext *cx, JSObject *obj);
(* JSEnumerateOp)(JSContext *cx, JSObject *obj);
/*
* Resolve a lazy property named by id in obj by defining it directly in obj.
@ -220,7 +218,7 @@ typedef JSBool
* NB: JSNewResolveOp provides a cheaper way to resolve lazy properties.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSResolveOp)(JSContext *cx, JSObject *obj, jsval id);
(* JSResolveOp)(JSContext *cx, JSObject *obj, jsval id);
/*
* Like JSResolveOp, but flags provide contextual information as follows:
@ -252,16 +250,15 @@ typedef JSBool
* *objp without a new JSClass flag.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSNewResolveOp)(JSContext *cx, JSObject *obj, jsval id,
uintN flags, JSObject **objp);
(* JSNewResolveOp)(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp);
/*
* Convert obj to the given type, returning true with the resulting value in
* *vp on success, and returning false on error or exception.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSConvertOp)(JSContext *cx, JSObject *obj, JSType type,
jsval *vp);
(* JSConvertOp)(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
/*
* Finalize obj, which the garbage collector has determined to be unreachable
@ -269,14 +266,14 @@ typedef JSBool
* store a reference to obj.
*/
typedef void
(* JS_DLL_CALLBACK JSFinalizeOp)(JSContext *cx, JSObject *obj);
(* JSFinalizeOp)(JSContext *cx, JSObject *obj);
/*
* Used by JS_AddExternalStringFinalizer and JS_RemoveExternalStringFinalizer
* to extend and reduce the set of string types finalized by the GC.
*/
typedef void
(* JS_DLL_CALLBACK JSStringFinalizeOp)(JSContext *cx, JSString *str);
(* JSStringFinalizeOp)(JSContext *cx, JSString *str);
/*
* The signature for JSClass.getObjectOps, used by JS_NewObject's internals
@ -303,7 +300,7 @@ typedef void
* extended hooks needed for E4X.
*/
typedef JSObjectOps *
(* JS_DLL_CALLBACK JSGetObjectOps)(JSContext *cx, JSClass *clasp);
(* JSGetObjectOps)(JSContext *cx, JSClass *clasp);
/*
* JSClass.checkAccess type: check whether obj[id] may be accessed per mode,
@ -318,15 +315,15 @@ typedef JSObjectOps *
* specialize access checks.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSCheckAccessOp)(JSContext *cx, JSObject *obj, jsval id,
JSAccessMode mode, jsval *vp);
(* JSCheckAccessOp)(JSContext *cx, JSObject *obj, jsval id, JSAccessMode mode,
jsval *vp);
/*
* Encode or decode an object, given an XDR state record representing external
* data. See jsxdrapi.h.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSXDRObjectOp)(JSXDRState *xdr, JSObject **objp);
(* JSXDRObjectOp)(JSXDRState *xdr, JSObject **objp);
/*
* Check whether v is an instance of obj. Return false on error or exception,
@ -334,8 +331,7 @@ typedef JSBool
* *bp otherwise.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSHasInstanceOp)(JSContext *cx, JSObject *obj, jsval v,
JSBool *bp);
(* JSHasInstanceOp)(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
/*
* Deprecated function type for JSClass.mark. All new code should define
@ -343,7 +339,7 @@ typedef JSBool
* the native structures.
*/
typedef uint32
(* JS_DLL_CALLBACK JSMarkOp)(JSContext *cx, JSObject *obj, void *arg);
(* JSMarkOp)(JSContext *cx, JSObject *obj, void *arg);
/*
* Function type for trace operation of the class called to enumerate all
@ -368,7 +364,7 @@ typedef uint32
* assigning JSClass.mark field.
*/
typedef void
(* JS_DLL_CALLBACK JSTraceOp)(JSTracer *trc, JSObject *obj);
(* JSTraceOp)(JSTracer *trc, JSObject *obj);
#if defined __GNUC__ && __GNUC__ >= 4 && !defined __cplusplus
# define JS_CLASS_TRACE(method) \
@ -395,7 +391,7 @@ extern JSMarkOp js_WrongTypeForClassTracer;
* JS_TraceChildren or DEBUG-only JS_PrintTraceThingInfo.
*/
typedef void
(* JS_DLL_CALLBACK JSTraceCallback)(JSTracer *trc, void *thing, uint32 kind);
(* JSTraceCallback)(JSTracer *trc, void *thing, uint32 kind);
/*
* DEBUG only callback that JSTraceOp implementation can provide to return
@ -403,8 +399,7 @@ typedef void
*/
#ifdef DEBUG
typedef void
(* JS_DLL_CALLBACK JSTraceNamePrinter)(JSTracer *trc, char *buf,
size_t bufsize);
(* JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize);
#endif
/*
@ -420,7 +415,7 @@ typedef void
* also lock obj.
*/
typedef uint32
(* JS_DLL_CALLBACK JSReserveSlotsOp)(JSContext *cx, JSObject *obj);
(* JSReserveSlotsOp)(JSContext *cx, JSObject *obj);
/* JSObjectOps function pointer typedefs. */
@ -438,16 +433,15 @@ typedef uint32
* be called to dispose of the map.
*/
typedef JSObjectMap *
(* JS_DLL_CALLBACK JSNewObjectMapOp)(JSContext *cx, jsrefcount nrefs,
JSObjectOps *ops, JSClass *clasp,
JSObject *obj);
(* JSNewObjectMapOp)(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops,
JSClass *clasp, JSObject *obj);
/*
* Generic type for an infallible JSObjectMap operation, used currently by
* JSObjectOps.destroyObjectMap.
*/
typedef void
(* JS_DLL_CALLBACK JSObjectMapOp)(JSContext *cx, JSObjectMap *map);
(* JSObjectMapOp)(JSContext *cx, JSObjectMap *map);
/*
* Look for id in obj and its prototype chain, returning false on error or
@ -467,8 +461,8 @@ typedef void
* or any obj-bearing ops before dropping *propp.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSLookupPropOp)(JSContext *cx, JSObject *obj, jsid id,
JSObject **objp, JSProperty **propp);
(* JSLookupPropOp)(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
JSProperty **propp);
/*
* Define obj[id], a direct property of obj named id, having the given initial
@ -483,10 +477,9 @@ typedef JSBool
* JSLookupPropOp.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSDefinePropOp)(JSContext *cx, JSObject *obj,
jsid id, jsval value,
JSPropertyOp getter, JSPropertyOp setter,
uintN attrs, JSProperty **propp);
(* JSDefinePropOp)(JSContext *cx, JSObject *obj, jsid id, jsval value,
JSPropertyOp getter, JSPropertyOp setter, uintN attrs,
JSProperty **propp);
/*
* Get, set, or delete obj[id], returning false on error or exception, true
@ -497,8 +490,7 @@ typedef JSBool
* prototype property, or no property in obj or its prototype chain).
*/
typedef JSBool
(* JS_DLL_CALLBACK JSPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id,
jsval *vp);
(* JSPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id, jsval *vp);
/*
* Get or set attributes of the property obj[id]. Return false on error or
@ -507,8 +499,8 @@ typedef JSBool
* JSLookupPropOp call.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSAttributesOp)(JSContext *cx, JSObject *obj, jsid id,
JSProperty *prop, uintN *attrsp);
(* JSAttributesOp)(JSContext *cx, JSObject *obj, jsid id, JSProperty *prop,
uintN *attrsp);
/*
* JSObjectOps.checkAccess type: check whether obj[id] may be accessed per
@ -516,9 +508,8 @@ typedef JSBool
* last-got value in *vp, and its attributes in *attrsp.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSCheckAccessIdOp)(JSContext *cx, JSObject *obj, jsid id,
JSAccessMode mode, jsval *vp,
uintN *attrsp);
(* JSCheckAccessIdOp)(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
jsval *vp, uintN *attrsp);
/*
* A generic type for functions mapping an object to another object, or null
@ -526,15 +517,14 @@ typedef JSBool
* at present.
*/
typedef JSObject *
(* JS_DLL_CALLBACK JSObjectOp)(JSContext *cx, JSObject *obj);
(* JSObjectOp)(JSContext *cx, JSObject *obj);
/*
* Hook that creates an iterator object for a given object. Returns the
* iterator object or null if an error or exception was thrown on cx.
*/
typedef JSObject *
(* JS_DLL_CALLBACK JSIteratorOp)(JSContext *cx, JSObject *obj,
JSBool keysonly);
(* JSIteratorOp)(JSContext *cx, JSObject *obj, JSBool keysonly);
/*
* A generic type for functions taking a context, object, and property, with
@ -543,8 +533,7 @@ typedef JSObject *
* dropProperty participates).
*/
typedef void
(* JS_DLL_CALLBACK JSPropertyRefOp)(JSContext *cx, JSObject *obj,
JSProperty *prop);
(* JSPropertyRefOp)(JSContext *cx, JSObject *obj, JSProperty *prop);
/*
* Function pointer type for JSObjectOps.setProto and JSObjectOps.setParent.
@ -552,8 +541,8 @@ typedef void
* special steps. See jsobj.c and jsgc.c for details.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSSetObjectSlotOp)(JSContext *cx, JSObject *obj,
uint32 slot, JSObject *pobj);
(* JSSetObjectSlotOp)(JSContext *cx, JSObject *obj, uint32 slot,
JSObject *pobj);
/*
* Get and set a required slot, one that should already have been allocated.
@ -569,43 +558,36 @@ typedef JSBool
* class, and optionally, the private data slot.
*/
typedef jsval
(* JS_DLL_CALLBACK JSGetRequiredSlotOp)(JSContext *cx, JSObject *obj,
uint32 slot);
(* JSGetRequiredSlotOp)(JSContext *cx, JSObject *obj, uint32 slot);
typedef JSBool
(* JS_DLL_CALLBACK JSSetRequiredSlotOp)(JSContext *cx, JSObject *obj,
uint32 slot, jsval v);
(* JSSetRequiredSlotOp)(JSContext *cx, JSObject *obj, uint32 slot, jsval v);
typedef JSObject *
(* JS_DLL_CALLBACK JSGetMethodOp)(JSContext *cx, JSObject *obj, jsid id,
jsval *vp);
(* JSGetMethodOp)(JSContext *cx, JSObject *obj, jsid id, jsval *vp);
typedef JSBool
(* JS_DLL_CALLBACK JSSetMethodOp)(JSContext *cx, JSObject *obj, jsid id,
jsval *vp);
(* JSSetMethodOp)(JSContext *cx, JSObject *obj, jsid id, jsval *vp);
typedef JSBool
(* JS_DLL_CALLBACK JSEnumerateValuesOp)(JSContext *cx, JSObject *obj,
JSIterateOp enum_op,
jsval *statep, jsid *idp, jsval *vp);
(* JSEnumerateValuesOp)(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp, jsval *vp);
typedef JSBool
(* JS_DLL_CALLBACK JSEqualityOp)(JSContext *cx, JSObject *obj, jsval v,
JSBool *bp);
(* JSEqualityOp)(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
typedef JSBool
(* JS_DLL_CALLBACK JSConcatenateOp)(JSContext *cx, JSObject *obj, jsval v,
jsval *vp);
(* JSConcatenateOp)(JSContext *cx, JSObject *obj, jsval v, jsval *vp);
/* Typedef for native functions called by the JS VM. */
typedef JSBool
(* JS_DLL_CALLBACK JSNative)(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval);
(* JSNative)(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
/* See jsapi.h, the JS_CALLEE, JS_THIS, etc. macros. */
typedef JSBool
(* JS_DLL_CALLBACK JSFastNative)(JSContext *cx, uintN argc, jsval *vp);
(* JSFastNative)(JSContext *cx, uintN argc, jsval *vp);
/* Callbacks and their arguments. */
@ -628,7 +610,7 @@ typedef enum JSContextOp {
* and return true in this case.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSContextCallback)(JSContext *cx, uintN contextOp);
(* JSContextCallback)(JSContext *cx, uintN contextOp);
typedef enum JSGCStatus {
JSGC_BEGIN,
@ -638,27 +620,26 @@ typedef enum JSGCStatus {
} JSGCStatus;
typedef JSBool
(* JS_DLL_CALLBACK JSGCCallback)(JSContext *cx, JSGCStatus status);
(* JSGCCallback)(JSContext *cx, JSGCStatus status);
/*
* Generic trace operation that calls JS_CallTracer on each traceable thing
* stored in data.
*/
typedef void
(* JS_DLL_CALLBACK JSTraceDataOp)(JSTracer *trc, void *data);
(* JSTraceDataOp)(JSTracer *trc, void *data);
typedef JSBool
(* JS_DLL_CALLBACK JSOperationCallback)(JSContext *cx);
(* JSOperationCallback)(JSContext *cx);
/*
* Deprecated form of JSOperationCallback.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSBranchCallback)(JSContext *cx, JSScript *script);
(* JSBranchCallback)(JSContext *cx, JSScript *script);
typedef void
(* JS_DLL_CALLBACK JSErrorReporter)(JSContext *cx, const char *message,
JSErrorReport *report);
(* JSErrorReporter)(JSContext *cx, const char *message, JSErrorReport *report);
/*
* Possible exception types. These types are part of a JSErrorFormatString
@ -690,33 +671,29 @@ typedef struct JSErrorFormatString {
} JSErrorFormatString;
typedef const JSErrorFormatString *
(* JS_DLL_CALLBACK JSErrorCallback)(void *userRef, const char *locale,
const uintN errorNumber);
(* JSErrorCallback)(void *userRef, const char *locale,
const uintN errorNumber);
#ifdef va_start
#define JS_ARGUMENT_FORMATTER_DEFINED 1
typedef JSBool
(* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format,
JSBool fromJS, jsval **vpp,
va_list *app);
(* JSArgumentFormatter)(JSContext *cx, const char *format, JSBool fromJS,
jsval **vpp, va_list *app);
#endif
typedef JSBool
(* JS_DLL_CALLBACK JSLocaleToUpperCase)(JSContext *cx, JSString *src,
jsval *rval);
(* JSLocaleToUpperCase)(JSContext *cx, JSString *src, jsval *rval);
typedef JSBool
(* JS_DLL_CALLBACK JSLocaleToLowerCase)(JSContext *cx, JSString *src,
jsval *rval);
(* JSLocaleToLowerCase)(JSContext *cx, JSString *src, jsval *rval);
typedef JSBool
(* JS_DLL_CALLBACK JSLocaleCompare)(JSContext *cx,
JSString *src1, JSString *src2,
jsval *rval);
(* JSLocaleCompare)(JSContext *cx, JSString *src1, JSString *src2,
jsval *rval);
typedef JSBool
(* JS_DLL_CALLBACK JSLocaleToUnicode)(JSContext *cx, char *src, jsval *rval);
(* JSLocaleToUnicode)(JSContext *cx, char *src, jsval *rval);
/*
* Security protocol types.
@ -731,8 +708,7 @@ typedef struct JSPrincipals JSPrincipals;
* error, which the implementation must have reported.
*/
typedef JSBool
(* JS_DLL_CALLBACK JSPrincipalsTranscoder)(JSXDRState *xdr,
JSPrincipals **principalsp);
(* JSPrincipalsTranscoder)(JSXDRState *xdr, JSPrincipals **principalsp);
/*
* Return a weak reference to the principals associated with obj, possibly via
@ -743,7 +719,7 @@ typedef JSBool
* callback's implementation.
*/
typedef JSPrincipals *
(* JS_DLL_CALLBACK JSObjectPrincipalsFinder)(JSContext *cx, JSObject *obj);
(* JSObjectPrincipalsFinder)(JSContext *cx, JSObject *obj);
JS_END_EXTERN_C

Просмотреть файл

@ -393,7 +393,7 @@ ChangeScope(JSContext *cx, JSScope *scope, int change)
*/
#define SPROP_FLAGS_NOT_MATCHED (SPROP_MARK | SPROP_FLAG_SHAPE_REGEN)
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
static JSDHashNumber
js_HashScopeProperty(JSDHashTable *table, const void *key)
{
const JSScopeProperty *sprop = (const JSScopeProperty *)key;
@ -439,7 +439,7 @@ js_HashScopeProperty(JSDHashTable *table, const void *key)
(((sprop)->flags ^ (aflags)) & ~SPROP_FLAGS_NOT_MATCHED) == 0 && \
(sprop)->shortid == (ashortid))
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
js_MatchScopeProperty(JSDHashTable *table,
const JSDHashEntryHdr *hdr,
const void *key)
@ -1617,7 +1617,7 @@ MeterPropertyTree(JSBasicStats *bs, JSScopeProperty *node)
MeterKidCount(bs, nkids);
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
js_MeterPropertyTree(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
void *arg)
{

Просмотреть файл

@ -963,7 +963,7 @@ js_InitScriptClass(JSContext *cx, JSObject *obj)
/*
* Shared script filename management.
*/
JS_STATIC_DLL_CALLBACK(int)
static int
js_compare_strings(const void *k1, const void *k2)
{
return strcmp((const char *) k1, (const char *) k2) == 0;
@ -979,19 +979,19 @@ typedef struct ScriptFilenameEntry {
char filename[3]; /* two or more bytes, NUL-terminated */
} ScriptFilenameEntry;
JS_STATIC_DLL_CALLBACK(void *)
static void *
js_alloc_table_space(void *priv, size_t size)
{
return malloc(size);
}
JS_STATIC_DLL_CALLBACK(void)
static void
js_free_table_space(void *priv, void *item)
{
free(item);
}
JS_STATIC_DLL_CALLBACK(JSHashEntry *)
static JSHashEntry *
js_alloc_sftbl_entry(void *priv, const void *key)
{
size_t nbytes = offsetof(ScriptFilenameEntry, filename) +
@ -1000,7 +1000,7 @@ js_alloc_sftbl_entry(void *priv, const void *key)
return (JSHashEntry *) malloc(JS_MAX(nbytes, sizeof(JSHashEntry)));
}
JS_STATIC_DLL_CALLBACK(void)
static void
js_free_sftbl_entry(void *priv, JSHashEntry *he, uintN flag)
{
if (flag != HT_FREE_ENTRY)
@ -1238,7 +1238,7 @@ js_MarkScriptFilename(const char *filename)
sfe->mark = JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(intN)
static intN
js_script_filename_marker(JSHashEntry *he, intN i, void *arg)
{
ScriptFilenameEntry *sfe = (ScriptFilenameEntry *) he;
@ -1269,7 +1269,7 @@ js_MarkScriptFilenames(JSRuntime *rt, JSBool keepAtoms)
}
}
JS_STATIC_DLL_CALLBACK(intN)
static intN
js_script_filename_sweeper(JSHashEntry *he, intN i, void *arg)
{
ScriptFilenameEntry *sfe = (ScriptFilenameEntry *) he;

Просмотреть файл

@ -2383,7 +2383,7 @@ static JSFunctionSpec string_static_methods[] = {
JS_FS_END
};
JS_STATIC_DLL_CALLBACK(JSHashNumber)
static JSHashNumber
js_hash_string_pointer(const void *key)
{
return (JSHashNumber)JS_PTR_TO_UINT32(key) >> JSVAL_TAGBITS;

Просмотреть файл

@ -84,9 +84,6 @@
# define JS_EXTERN_DATA(__type) extern __declspec(dllexport) __type
# define JS_EXPORT_DATA(__type) __declspec(dllexport) __type
# define JS_DLL_CALLBACK
# define JS_STATIC_DLL_CALLBACK(__x) static __x
#elif defined(XP_OS2) && defined(__declspec)
# define JS_EXTERN_API(__type) extern __declspec(dllexport) __type
@ -94,9 +91,6 @@
# define JS_EXTERN_DATA(__type) extern __declspec(dllexport) __type
# define JS_EXPORT_DATA(__type) __declspec(dllexport) __type
# define JS_DLL_CALLBACK
# define JS_STATIC_DLL_CALLBACK(__x) static __x
#else /* Unix */
# ifdef HAVE_VISIBILITY_ATTRIBUTE
@ -110,9 +104,6 @@
# define JS_EXTERN_DATA(__type) extern JS_EXTERNAL_VIS __type
# define JS_EXPORT_DATA(__type) JS_EXTERNAL_VIS __type
# define JS_DLL_CALLBACK
# define JS_STATIC_DLL_CALLBACK(__x) static __x
#endif
#ifdef _WIN32

Просмотреть файл

@ -6036,7 +6036,7 @@ TraceObjectVector(JSTracer *trc, JSObject **vec, uint32 len)
}
}
JS_STATIC_DLL_CALLBACK(void)
static void
trace_temp_ns_array(JSTracer *trc, JSTempValueRooter *tvr)
{
JSTempRootedNSArray *tmp = (JSTempRootedNSArray *)tvr;

Просмотреть файл

@ -55,7 +55,7 @@ extern const char js_lt_entity_str[];
extern const char js_quot_entity_str[];
typedef JSBool
(* JS_DLL_CALLBACK JSIdentityOp)(const void *a, const void *b);
(* JSIdentityOp)(const void *a, const void *b);
struct JSXMLArray {
uint32 length;

Просмотреть файл

@ -466,13 +466,6 @@ DLL entry points have their return type expanded within a JS_EXPORT_API()&nbsp;
macro call, to get the right Windows secret type qualifiers in the right
places for both 16- and 32-bit builds.</li>
<li>
Callback functions that might be called from a DLL are similarly macroized
with JS_STATIC_DLL_CALLBACK (if the function otherwise would be static
to hide its name) or JS_DLL_CALLBACK (this macro takes no type argument;
it should be used after the return type and before the function name).</li>
</ul>
<h2>
<a NAME="API"></a>The LiveConnect API</h2>
All public LiveConnect entry points and callbacks are documented in

Просмотреть файл

@ -374,7 +374,7 @@ destroy_saved_js_error(JNIEnv *jEnv, CapturedJSError *error)
* into JavaScript, in which case the error will be re-reported as a JavaScript
* error.
*/
JS_STATIC_DLL_CALLBACK(void)
static void
capture_js_error_reports_for_java(JSContext *cx, const char *message,
JSErrorReport *report)
{

Просмотреть файл

@ -208,7 +208,7 @@ access_java_array_element(JSContext *cx,
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_getPropertyById(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
JNIEnv *jEnv;
@ -223,7 +223,7 @@ JavaArray_getPropertyById(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return result;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_setPropertyById(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
JNIEnv *jEnv;
@ -238,7 +238,7 @@ JavaArray_setPropertyById(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return result;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_lookupProperty(JSContext *cx, JSObject *obj, jsid id,
JSObject **objp, JSProperty **propp)
{
@ -263,7 +263,7 @@ JavaArray_lookupProperty(JSContext *cx, JSObject *obj, jsid id,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
JSPropertyOp getter, JSPropertyOp setter,
uintN attrs, JSProperty **propp)
@ -277,7 +277,7 @@ JavaArray_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
return JavaArray_setPropertyById(cx, obj, id, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_getAttributes(JSContext *cx, JSObject *obj, jsid id,
JSProperty *prop, uintN *attrsp)
{
@ -286,7 +286,7 @@ JavaArray_getAttributes(JSContext *cx, JSObject *obj, jsid id,
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_setAttributes(JSContext *cx, JSObject *obj, jsid id,
JSProperty *prop, uintN *attrsp)
{
@ -300,7 +300,7 @@ JavaArray_setAttributes(JSContext *cx, JSObject *obj, jsid id,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_deleteProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
JSVersion version = JS_GetVersion(cx);
@ -318,14 +318,14 @@ JavaArray_deleteProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_defaultValue(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
/* printf("In JavaArray_defaultValue()\n"); */
return JavaObject_convert(cx, obj, JSTYPE_STRING, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp)
{
@ -388,7 +388,7 @@ JavaArray_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
return ok;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaArray_checkAccess(JSContext *cx, JSObject *obj, jsid id,
JSAccessMode mode, jsval *vp, uintN *attrsp)
{
@ -433,7 +433,7 @@ JSObjectOps JavaArray_ops = {
jsj_wrapper_setRequiredSlot /* setRequiredSlot */
};
JS_STATIC_DLL_CALLBACK(JSObjectOps *)
static JSObjectOps *
JavaArray_getObjectOps(JSContext *cx, JSClass *clazz)
{
return &JavaArray_ops;

Просмотреть файл

@ -58,7 +58,7 @@
#include "jsj_private.h" /* LiveConnect internals */
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
char *name;
@ -158,7 +158,7 @@ done:
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_getPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
jsval idval;
@ -227,7 +227,7 @@ JavaClass_getPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_setPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
jclass java_class;
@ -280,7 +280,7 @@ no_such_field:
/*
* Free the private native data associated with the JavaPackage object.
*/
JS_STATIC_DLL_CALLBACK(void)
static void
JavaClass_finalize(JSContext *cx, JSObject *obj)
{
JNIEnv *jEnv;
@ -301,7 +301,7 @@ JavaClass_finalize(JSContext *cx, JSObject *obj)
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_lookupProperty(JSContext *cx, JSObject *obj, jsid id,
JSObject **objp, JSProperty **propp)
{
@ -330,7 +330,7 @@ JavaClass_lookupProperty(JSContext *cx, JSObject *obj, jsid id,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
JSPropertyOp getter, JSPropertyOp setter,
uintN attrs, JSProperty **propp)
@ -348,7 +348,7 @@ JavaClass_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_getAttributes(JSContext *cx, JSObject *obj, jsid id,
JSProperty *prop, uintN *attrsp)
{
@ -357,7 +357,7 @@ JavaClass_getAttributes(JSContext *cx, JSObject *obj, jsid id,
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_setAttributes(JSContext *cx, JSObject *obj, jsid id,
JSProperty *prop, uintN *attrsp)
{
@ -371,7 +371,7 @@ JavaClass_setAttributes(JSContext *cx, JSObject *obj, jsid id,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_deleteProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
JSVersion version = JS_GetVersion(cx);
@ -389,14 +389,14 @@ JavaClass_deleteProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_defaultValue(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
/* printf("In JavaClass_defaultValue()\n"); */
return JavaClass_convert(cx, obj, JSTYPE_STRING, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp)
{
@ -458,7 +458,7 @@ JavaClass_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_checkAccess(JSContext *cx, JSObject *obj, jsid id,
JSAccessMode mode, jsval *vp, uintN *attrsp)
{
@ -477,7 +477,7 @@ JavaClass_checkAccess(JSContext *cx, JSObject *obj, jsid id,
* Implement the JavaScript instanceof operator for JavaClass objects by using
* the equivalent Java instanceof operation.
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_hasInstance(JSContext *cx, JSObject *obj, jsval candidate_jsval,
JSBool *has_instancep)
{
@ -558,7 +558,7 @@ JSObjectOps JavaClass_ops = {
jsj_wrapper_setRequiredSlot /* setRequiredSlot */
};
JS_STATIC_DLL_CALLBACK(JSObjectOps *)
static JSObjectOps *
JavaClass_getObjectOps(JSContext *cx, JSClass *clazz)
{
return &JavaClass_ops;
@ -631,7 +631,7 @@ jsj_define_JavaClass(JSContext *cx, JNIEnv *jEnv, JSObject* parent_obj,
* js> getClass(new java.lang.String("foo"))
* [JavaClass java.lang.String]
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
getClass(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSObject *obj_arg, *JavaClass_obj;
@ -674,7 +674,7 @@ getClass(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaClass_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSObject *obj_arg, *JavaClass_obj;

Просмотреть файл

@ -92,7 +92,7 @@ jsj_CreateJavaMember(JSContext *cx, jsval method_val, jsval field_val)
return JavaMember_obj;
}
JS_STATIC_DLL_CALLBACK(void)
static void
JavaMember_finalize(JSContext *cx, JSObject *obj)
{
JavaMethodOrFieldValue *member_val;
@ -103,7 +103,7 @@ JavaMember_finalize(JSContext *cx, JSObject *obj)
JS_free(cx, member_val);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaMember_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
JavaMethodOrFieldValue *member_val;
@ -143,14 +143,14 @@ JavaMember_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
* engine is written now, it's never actually called because when a JavaMember
* is invoked, it's converted to a JS function via JavaMember_convert().
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaMember_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JS_ASSERT(0);
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
JavaMember_trace(JSTracer *trc, JSObject *obj)
{
JavaMethodOrFieldValue *member_val;

Просмотреть файл

@ -90,7 +90,7 @@ static JSBool installed_GC_callback = JS_FALSE;
static JSGCCallback old_GC_callback = NULL;
static JavaObjectWrapper* deferred_wrappers = NULL;
static JSBool JS_DLL_CALLBACK jsj_GC_callback(JSContext *cx, JSGCStatus status)
static JSBool jsj_GC_callback(JSContext *cx, JSGCStatus status)
{
if (status == JSGC_END && deferred_wrappers) {
JNIEnv *jEnv;
@ -372,7 +372,7 @@ jsj_DiscardJavaObjReflections(JNIEnv *jEnv)
}
}
JSBool JS_DLL_CALLBACK
JSBool
JavaObject_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
JavaObjectWrapper *java_wrapper;
@ -727,7 +727,7 @@ JavaObject_getPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_setPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
jobject java_obj;
@ -811,7 +811,7 @@ no_such_field:
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_lookupProperty(JSContext *cx, JSObject *obj, jsid id,
JSObject **objp, JSProperty **propp)
{
@ -851,7 +851,7 @@ JavaObject_lookupProperty(JSContext *cx, JSObject *obj, jsid id,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
JSPropertyOp getter, JSPropertyOp setter,
uintN attrs, JSProperty **propp)
@ -861,7 +861,7 @@ JavaObject_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_getAttributes(JSContext *cx, JSObject *obj, jsid id,
JSProperty *prop, uintN *attrsp)
{
@ -870,7 +870,7 @@ JavaObject_getAttributes(JSContext *cx, JSObject *obj, jsid id,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_setAttributes(JSContext *cx, JSObject *obj, jsid id,
JSProperty *prop, uintN *attrsp)
{
@ -884,7 +884,7 @@ JavaObject_setAttributes(JSContext *cx, JSObject *obj, jsid id,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_deleteProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
JSVersion version = JS_GetVersion(cx);
@ -902,14 +902,14 @@ JavaObject_deleteProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_defaultValue(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
/* printf("In JavaObject_defaultValue()\n"); */
return JavaObject_convert(cx, obj, type, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp)
{
@ -976,7 +976,7 @@ JavaObject_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaObject_checkAccess(JSContext *cx, JSObject *obj, jsid id,
JSAccessMode mode, jsval *vp, uintN *attrsp)
{
@ -993,7 +993,7 @@ JavaObject_checkAccess(JSContext *cx, JSObject *obj, jsid id,
#define JSJ_SLOT_COUNT (JSSLOT_PRIVATE+1)
JSObjectMap * JS_DLL_CALLBACK
JSObjectMap *
jsj_wrapper_newObjectMap(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops,
JSClass *clasp, JSObject *obj)
{
@ -1008,13 +1008,13 @@ jsj_wrapper_newObjectMap(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops,
return map;
}
void JS_DLL_CALLBACK
void
jsj_wrapper_destroyObjectMap(JSContext *cx, JSObjectMap *map)
{
JS_free(cx, map);
}
jsval JS_DLL_CALLBACK
jsval
jsj_wrapper_getRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot)
{
JS_ASSERT(slot < JSJ_SLOT_COUNT);
@ -1022,7 +1022,7 @@ jsj_wrapper_getRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot)
return STOBJ_GET_SLOT(obj, slot);
}
JSBool JS_DLL_CALLBACK
JSBool
jsj_wrapper_setRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot, jsval v)
{
JS_ASSERT(slot < JSJ_SLOT_COUNT);
@ -1061,7 +1061,7 @@ JSObjectOps JavaObject_ops = {
jsj_wrapper_setRequiredSlot /* setRequiredSlot */
};
JS_STATIC_DLL_CALLBACK(JSObjectOps *)
static JSObjectOps *
JavaObject_getObjectOps(JSContext *cx, JSClass *clazz)
{
return &JavaObject_ops;

Просмотреть файл

@ -137,7 +137,7 @@ define_JavaPackage(JSContext *cx, JSObject *parent_obj,
* it is illegal to write "java.lang.myProperty = 4". We probably could relax
* this restriction, but it's potentially confusing and not clearly useful.
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaPackage_setProperty(JSContext *cx, JSObject *obj, jsval slot, jsval *vp)
{
JavaPackage_Private *package = JS_GetPrivate(cx, obj);
@ -156,7 +156,7 @@ static JSBool quiet_resolve_failure;
/*
* Resolve a component name to be either the name of a class or a package.
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaPackage_resolve(JSContext *cx, JSObject *obj, jsval id)
{
JavaPackage_Private *package;
@ -289,7 +289,7 @@ out:
return ok;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaPackage_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
JSString *str;
@ -342,7 +342,7 @@ JavaPackage_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
/*
* Free the private native data associated with the JavaPackage object.
*/
JS_STATIC_DLL_CALLBACK(void)
static void
JavaPackage_finalize(JSContext *cx, JSObject *obj)
{
JavaPackage_Private *package = JS_GetPrivate(cx, obj);
@ -532,7 +532,7 @@ error:
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
JavaPackage_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{

Просмотреть файл

@ -404,7 +404,7 @@ error:
}
/* Trivial helper for jsj_DiscardJavaClassReflections(), below */
JS_STATIC_DLL_CALLBACK(JSIntn)
static JSIntn
enumerate_remove_java_class(JSJHashEntry *he, JSIntn i, void *arg)
{
JSJavaThreadState *jsj_env = (JSJavaThreadState *)arg;

Просмотреть файл

@ -61,9 +61,9 @@ typedef struct JSJHashEntry JSJHashEntry;
typedef struct JSJHashTable JSJHashTable;
typedef JSUint32 JSJHashNumber;
#define JSJ_HASH_BITS 32
typedef JSJHashNumber (* JS_DLL_CALLBACK JSJHashFunction)(const void *key, void *arg);
typedef JSIntn (* JS_DLL_CALLBACK JSJHashComparator)(const void *v1, const void *v2, void *arg);
typedef JSIntn (* JS_DLL_CALLBACK JSJHashEnumerator)(JSJHashEntry *he, JSIntn i, void *arg);
typedef JSJHashNumber (* JSJHashFunction)(const void *key, void *arg);
typedef JSIntn (* JSJHashComparator)(const void *v1, const void *v2, void *arg);
typedef JSIntn (* JSJHashEnumerator)(JSJHashEntry *he, JSIntn i, void *arg);
/* Flag bits in JSJHashEnumerator's return value */
#define HT_ENUMERATE_NEXT 0 /* continue enumerating entries */

Просмотреть файл

@ -555,7 +555,7 @@ jsj_WrapJavaObject(JSContext *cx, JNIEnv *jEnv, jobject java_obj, jclass java_cl
extern void
jsj_DiscardJavaObjReflections(JNIEnv *jEnv);
extern JSBool JS_DLL_CALLBACK
extern JSBool
JavaObject_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
JS_EXTERN_API(void)
@ -610,13 +610,13 @@ jsj_GetJavaErrorMessage(JNIEnv *env);
extern void
jsj_LogError(const char *error_msg);
extern const JSErrorFormatString * JS_DLL_CALLBACK
extern const JSErrorFormatString *
jsj_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber);
JSJHashNumber JS_DLL_CALLBACK
JSJHashNumber
jsj_HashJavaObject(const void *key, void* env);
intN JS_DLL_CALLBACK
intN
jsj_JavaObjectComparator(const void *v1, const void *v2, void *arg);
extern JSJavaThreadState *
@ -643,17 +643,17 @@ jsj_EnterJava(JSContext *cx, JNIEnv **envp);
extern void
jsj_ExitJava(JSJavaThreadState *jsj_env);
extern JSObjectMap * JS_DLL_CALLBACK
extern JSObjectMap *
jsj_wrapper_newObjectMap(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops,
JSClass *clasp, JSObject *obj);
extern void JS_DLL_CALLBACK
extern void
jsj_wrapper_destroyObjectMap(JSContext *cx, JSObjectMap *map);
extern jsval JS_DLL_CALLBACK
extern jsval
jsj_wrapper_getRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot);
extern JSBool JS_DLL_CALLBACK
extern JSBool
jsj_wrapper_setRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot, jsval v);
#ifdef DEBUG

Просмотреть файл

@ -80,7 +80,7 @@ default_map_java_object_to_js_object(JNIEnv *jEnv, void *hint, char **errp)
return the_global_js_obj;
}
static JSBool JS_DLL_CALLBACK
static JSBool
default_create_java_vm(SystemJavaVM* *jvm, JNIEnv* *initialEnv, void* initargs)
{
jint err;
@ -116,7 +116,7 @@ default_create_java_vm(SystemJavaVM* *jvm, JNIEnv* *initialEnv, void* initargs)
return err == 0;
}
static JSBool JS_DLL_CALLBACK
static JSBool
default_destroy_java_vm(SystemJavaVM* jvm, JNIEnv* initialEnv)
{
JavaVM* java_vm = (JavaVM*)jvm;
@ -124,7 +124,7 @@ default_destroy_java_vm(SystemJavaVM* jvm, JNIEnv* initialEnv)
return err == 0;
}
static JNIEnv* JS_DLL_CALLBACK
static JNIEnv*
default_attach_current_thread(SystemJavaVM* jvm)
{
JavaVM* java_vm = (JavaVM*)jvm;
@ -133,7 +133,7 @@ default_attach_current_thread(SystemJavaVM* jvm)
return env;
}
static JSBool JS_DLL_CALLBACK
static JSBool
default_detach_current_thread(SystemJavaVM* jvm, JNIEnv* env)
{
JavaVM* java_vm = (JavaVM*)jvm;
@ -142,7 +142,7 @@ default_detach_current_thread(SystemJavaVM* jvm, JNIEnv* env)
return err == 0;
}
static SystemJavaVM* JS_DLL_CALLBACK
static SystemJavaVM*
default_get_java_vm(JNIEnv* env)
{
JavaVM* java_vm = NULL;

Просмотреть файл

@ -63,7 +63,7 @@
* This is a hash-table utility routine that computes the hash code of a Java
* object by calling java.lang.System.identityHashCode()
*/
JSJHashNumber JS_DLL_CALLBACK
JSJHashNumber
jsj_HashJavaObject(const void *key, void* env)
{
JSHashNumber hash_code;
@ -93,7 +93,7 @@ jsj_HashJavaObject(const void *key, void* env)
* or handles (though they may be in some JVM implementations). Instead,
* use the JNI routine for comparing the two objects.
*/
intN JS_DLL_CALLBACK
intN
jsj_JavaObjectComparator(const void *v1, const void *v2, void *arg)
{
jobject java_obj1, java_obj2;

Просмотреть файл

@ -25,8 +25,6 @@ s/\([^U]\)int16/\1PRInt16/g
s/JSBool/PRBool/g
s/extern JS_PUBLIC_API(\([^()]*\))/NS_COM_GLUE \1/
s/JS_PUBLIC_API(\([^()]*\))/\1/
s/JS_DLL_CALLBACK/PR_CALLBACK/
s/JS_STATIC_DLL_CALLBACK/PR_STATIC_CALLBACK/
s/JS_NewDHashTable/PL_NewDHashTable/
s/JS_ASSERT(0)/NS_NOTREACHED("0")/
s/\( *\)JS_ASSERT(\(.*\));/\1NS_ASSERTION(\2,\n\1 "\2");/

Просмотреть файл

@ -559,7 +559,7 @@ PRMJ_DSTOffset(JSInt64 local_time)
}
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
JS_STATIC_DLL_CALLBACK(void)
static void
PRMJ_InvalidParameterHandler(const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,

Просмотреть файл

@ -123,7 +123,7 @@ static PRLogModuleInfo *gJSCLLog;
#define ERROR_GETTING_SYMBOL "%s - Could not get symbol '%s'."
#define ERROR_SETTING_SYMBOL "%s - Could not set symbol '%s' on target object."
void JS_DLL_CALLBACK
void
mozJSLoaderErrorReporter(JSContext *cx, const char *message, JSErrorReport *rep)
{
nsresult rv;
@ -181,7 +181,7 @@ mozJSLoaderErrorReporter(JSContext *cx, const char *message, JSErrorReport *rep)
#endif
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Dump(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSString *str;
@ -197,7 +197,7 @@ Dump(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Debug(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
#ifdef DEBUG
@ -207,7 +207,7 @@ Debug(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
#endif
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Atob(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSString *str;
@ -243,7 +243,7 @@ Atob(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Btoa(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSString *str;

Просмотреть файл

@ -73,7 +73,7 @@
#define LOAD_ERROR_NOSPEC "Failed to get URI spec. This is bad."
// We just use the same reporter as the component loader
extern void JS_DLL_CALLBACK
extern void
mozJSLoaderErrorReporter(JSContext *cx, const char *message, JSErrorReport *rep);
mozJSSubScriptLoader::mozJSSubScriptLoader() : mSystemPrincipal(nsnull)

Просмотреть файл

@ -113,7 +113,7 @@ static JSBool compileOnly = JS_FALSE;
JSPrincipals *gJSPrincipals = nsnull;
JS_STATIC_DLL_CALLBACK(void)
static void
my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
{
int i, j, k, n;
@ -180,7 +180,7 @@ my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
JS_free(cx, prefix);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
uintN i, n;
@ -198,7 +198,7 @@ Print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Dump(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSString *str;
@ -217,7 +217,7 @@ Dump(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
uintN i;
@ -251,7 +251,7 @@ Load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Version(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
if (argc > 0 && JSVAL_IS_INT(argv[0]))
@ -261,14 +261,14 @@ Version(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
BuildDate(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
fprintf(gOutFile, "built on %s at %s\n", __DATE__, __TIME__);
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Quit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
#ifdef LIVECONNECT
@ -283,7 +283,7 @@ Quit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
DumpXPC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
int32 depth = 2;
@ -302,7 +302,7 @@ DumpXPC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
/* XXX needed only by GC() */
#include "jscntxt.h"
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
GC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSRuntime *rt;
@ -408,7 +408,7 @@ DumpHeap(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
#endif /* DEBUG */
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Clear(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
if (argc > 0 && !JSVAL_IS_PRIMITIVE(argv[0])) {
@ -586,7 +586,7 @@ JSErrorFormatString jsShell_ErrorFormatString[JSErr_Limit] = {
#undef MSG_DEF
};
JS_STATIC_DLL_CALLBACK(const JSErrorFormatString *)
static const JSErrorFormatString *
my_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber)
{
if ((errorNumber > 0) && (errorNumber < JSShellErr_Limit))
@ -1303,7 +1303,7 @@ nsXPCFunctionThisTranslator::TranslateThis(nsISupports *aInitialThis,
#endif
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
ContextCallback(JSContext *cx, uintN contextOp)
{
if (contextOp == JSCONTEXT_NEW) {

Просмотреть файл

@ -49,52 +49,52 @@
// This file implements a wrapper around objects that allows them to be
// accessed safely from across origins.
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Enumerate(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_XOW_Finalize(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_CheckAccess(JSContext *cx, JSObject *obj, jsval id, JSAccessMode mode,
jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_XOW_Iterator(JSContext *cx, JSObject *obj, JSBool keysonly);
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_XOW_WrappedObject(JSContext *cx, JSObject *obj);
JSExtendedClass sXPC_XOW_JSClass = {
@ -132,7 +132,7 @@ JSExtendedClass sXPC_XOW_JSClass = {
// do anything.
static const int XPC_XOW_ScopeSlot = XPCWrapper::sNumSlots;
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
@ -542,7 +542,7 @@ XPC_XOW_WrapObject(JSContext *cx, JSObject *parent, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
// All AddProperty needs to do is pass on addProperty requests to
@ -582,7 +582,7 @@ XPC_XOW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return XPCWrapper::AddProperty(cx, obj, wrappedObj, id, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *wrappedObj = GetWrappedObject(cx, obj);
@ -737,19 +737,19 @@ XPC_XOW_GetOrSetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp,
return WrapSameOriginProp(cx, obj, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return XPC_XOW_GetOrSetProperty(cx, obj, id, vp, JS_FALSE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return XPC_XOW_GetOrSetProperty(cx, obj, id, vp, JS_TRUE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Enumerate(JSContext *cx, JSObject *obj)
{
obj = GetWrapper(obj);
@ -777,7 +777,7 @@ XPC_XOW_Enumerate(JSContext *cx, JSObject *obj)
return XPCWrapper::Enumerate(cx, obj, wrappedObj);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp)
{
@ -853,7 +853,7 @@ XPC_XOW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
return XPCWrapper::NewResolve(cx, obj, wrappedObj, id, flags, objp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
// Don't do any work to convert to object.
@ -900,7 +900,7 @@ XPC_XOW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
: XPC_XOW_RewrapIfNeeded(cx, obj, vp);
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_XOW_Finalize(JSContext *cx, JSObject *obj)
{
JSObject *wrappedObj = GetWrappedObject(cx, obj);
@ -927,7 +927,7 @@ XPC_XOW_Finalize(JSContext *cx, JSObject *obj)
scope->GetWrapperMap()->Remove(wrappedObj);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_CheckAccess(JSContext *cx, JSObject *obj, jsval prop, JSAccessMode mode,
jsval *vp)
{
@ -940,7 +940,7 @@ XPC_XOW_CheckAccess(JSContext *cx, JSObject *obj, jsval prop, JSAccessMode mode,
JS_CheckAccess(cx, GetWrappedObject(cx, obj), id, mode, vp, &junk);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSObject *wrappedObj = GetWrappedObject(cx, obj);
@ -975,7 +975,7 @@ XPC_XOW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return XPC_XOW_RewrapIfNeeded(cx, callee, rval);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -1011,7 +1011,7 @@ XPC_XOW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return XPC_XOW_RewrapIfNeeded(cx, callee, rval);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
{
JSObject *iface = GetWrappedObject(cx, obj);
@ -1051,7 +1051,7 @@ XPC_XOW_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
return clasp->hasInstance(cx, iface, v, bp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
{
// Convert both sides to XPCWrappedNative and see if they match.
@ -1092,7 +1092,7 @@ XPC_XOW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
equality(cx, obj, OBJECT_TO_JSVAL(test), bp);
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_XOW_Iterator(JSContext *cx, JSObject *obj, JSBool keysonly)
{
JSObject *wrappedObj = GetWrappedObject(cx, obj);
@ -1141,13 +1141,13 @@ XPC_XOW_Iterator(JSContext *cx, JSObject *obj, JSBool keysonly)
keysonly);
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_XOW_WrappedObject(JSContext *cx, JSObject *obj)
{
return GetWrappedObject(cx, obj);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_XOW_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{

Просмотреть файл

@ -458,7 +458,7 @@ JSBool GetMember(XPCCallContext& ccx, JSObject* funobj, XPCNativeInterface*& ifa
* @param vp The return value
* @return Returns JS_TRUE if the operation succeeded
*/
JSBool JS_DLL_CALLBACK
JSBool
XPC_IDispatch_CallMethod(JSContext* cx, JSObject* obj, uintN argc,
jsval* argv, jsval* vp)
{
@ -492,7 +492,7 @@ XPC_IDispatch_CallMethod(JSContext* cx, JSObject* obj, uintN argc,
* @param vp The return value
* @return Returns JS_TRUE if the operation succeeded
*/
JSBool JS_DLL_CALLBACK
JSBool
XPC_IDispatch_GetterSetter(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *vp)
{

Просмотреть файл

@ -66,7 +66,7 @@ XPCDispParamPropJSClass* GetParamProp(JSContext* cx, JSObject* obj)
* @param vp Pointer to the return value
* @return JSBool JS_TRUE if property was retrieved
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_PP_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
XPCDispParamPropJSClass* paramProp = GetParamProp(cx, obj);
@ -87,7 +87,7 @@ XPC_PP_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
* @param vp Pointer to the return value
* @return JSBool JS_TRUE if property was retrieved
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_PP_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
XPCDispParamPropJSClass* paramProp = GetParamProp(cx, obj);
@ -126,7 +126,7 @@ XPC_PP_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
* @param vp Pointer to the return value
* @return JSBool JS_TRUE if property was retrieved
*/
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_PP_Finalize(JSContext *cx, JSObject *obj)
{
delete GetParamProp(cx, obj);
@ -137,7 +137,7 @@ XPC_PP_Finalize(JSContext *cx, JSObject *obj)
* @param trc the tracing structure
* @param obj the object being marked
*/
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_PP_Trace(JSTracer *trc, JSObject *obj)
{
XPCDispParamPropJSClass* paramProp = GetParamProp(trc->context, obj);

Просмотреть файл

@ -213,7 +213,7 @@ private:
* @param vp holds the result of the function
* @return true if the function completes without error
*/
JSBool JS_DLL_CALLBACK
JSBool
XPC_IDispatch_CallMethod(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *vp);
/**
@ -225,7 +225,7 @@ XPC_IDispatch_CallMethod(JSContext *cx, JSObject *obj, uintN argc,
* @param vp holds the result of the function
* @return true if the function completes without error
*/
JSBool JS_DLL_CALLBACK
JSBool
XPC_IDispatch_GetterSetter(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *vp);

Просмотреть файл

@ -231,7 +231,7 @@ STDMETHODIMP XPCDispatchTearOff::GetIDsOfNames(REFIID riid,
return S_OK;
}
void JS_DLL_CALLBACK
void
xpcWrappedJSErrorReporter(JSContext *cx, const char *message,
JSErrorReport *report);

Просмотреть файл

@ -128,7 +128,7 @@ CommonConstructor(JSContext *cx, int name, JSObject *obj, uintN argc,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
COMObjectConstructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -136,7 +136,7 @@ COMObjectConstructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
argv, rval, PR_FALSE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
ActiveXConstructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -144,7 +144,7 @@ ActiveXConstructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
rval, PR_TRUE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
ActiveXSupports(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{

Просмотреть файл

@ -44,53 +44,53 @@
#include "jsdbgapi.h"
#include "jsscope.h"
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Enumerate(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_NW_Finalize(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_CheckAccess(JSContext *cx, JSObject *obj, jsval id,
JSAccessMode mode, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_NW_Trace(JSTracer *trc, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_FunctionWrapper(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
@ -180,11 +180,11 @@ ShouldBypassNativeWrapper(JSContext *cx, JSObject *obj)
return !clasp_->hook || clasp_->hook args; \
)
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPCNativeWrapperCtor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
@ -276,7 +276,7 @@ XPC_NW_WrapFunction(JSContext* cx, JSObject* funobj, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
JSProperty *prop;
@ -310,7 +310,7 @@ XPC_NW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
XPC_NW_RewrapIfDeepWrapper(cx, obj, *vp, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
if (!EnsureLegalActivity(cx, obj)) {
@ -415,7 +415,7 @@ XPC_NW_RewrapIfDeepWrapper(JSContext *cx, JSObject *obj, jsval v, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_FunctionWrapper(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -531,19 +531,19 @@ XPC_NW_GetOrSetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp,
aIsSet, JS_TRUE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return XPC_NW_GetOrSetProperty(cx, obj, id, vp, PR_FALSE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return XPC_NW_GetOrSetProperty(cx, obj, id, vp, PR_TRUE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Enumerate(JSContext *cx, JSObject *obj)
{
// We are being notified of a for-in loop or similar operation on this
@ -564,7 +564,7 @@ XPC_NW_Enumerate(JSContext *cx, JSObject *obj)
return XPCWrapper::Enumerate(cx, obj, wn->GetFlatJSObject());
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp)
{
@ -644,7 +644,7 @@ XPC_NW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JS_TRUE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
if (!EnsureLegalActivity(cx, obj)) {
@ -655,7 +655,7 @@ XPC_NW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_NW_Finalize(JSContext *cx, JSObject *obj)
{
// We must not use obj's private data here since it's likely that it
@ -669,7 +669,7 @@ XPC_NW_Finalize(JSContext *cx, JSObject *obj)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_CheckAccess(JSContext *cx, JSObject *obj, jsval id,
JSAccessMode mode, jsval *vp)
{
@ -697,7 +697,7 @@ XPC_NW_CheckAccess(JSContext *cx, JSObject *obj, jsval id,
clazz->checkAccess(cx, wrapperJSObject, id, mode, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
if (!XPCNativeWrapper::IsNativeWrapper(obj)) {
@ -718,7 +718,7 @@ XPC_NW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -759,7 +759,7 @@ XPC_NW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return XPC_NW_RewrapIfDeepWrapper(cx, obj, *rval, rval);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
{
XPC_NW_BYPASS_TEST(cx, obj, hasInstance, (cx, obj, v, bp));
@ -785,7 +785,7 @@ MirrorWrappedNativeParent(JSContext *cx, XPCWrappedNative *wrapper,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPCNativeWrapperCtor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -975,7 +975,7 @@ XPCNativeWrapperCtor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_NW_Trace(JSTracer *trc, JSObject *obj)
{
XPCWrappedNative *wrappedNative = XPCNativeWrapper::GetWrappedNative(obj);
@ -986,7 +986,7 @@ XPC_NW_Trace(JSTracer *trc, JSObject *obj)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
{
NS_ASSERTION(XPCNativeWrapper::IsNativeWrapper(obj),
@ -1020,7 +1020,7 @@ XPC_NW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_NW_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -1178,7 +1178,7 @@ struct WrapperAndCxHolder
JSContext* cx;
};
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
ClearNativeWrapperScope(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{

Просмотреть файл

@ -42,36 +42,36 @@
#include "jsscript.h" // for js_ScriptClass
#include "XPCWrapper.h"
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Enumerate(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_SJOW_Finalize(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_CheckAccess(JSContext *cx, JSObject *obj, jsval id, JSAccessMode mode,
jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
@ -79,13 +79,13 @@ JSBool
XPC_SJOW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_SJOW_Iterator(JSContext *cx, JSObject *obj, JSBool keysonly);
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_SJOW_WrappedObject(JSContext *cx, JSObject *obj);
static inline
@ -208,7 +208,7 @@ JSExtendedClass sXPC_SJOW_JSClass = {
JSCLASS_NO_RESERVED_MEMBERS
};
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
@ -462,7 +462,7 @@ GetScriptedFunction(JSContext *cx, JSObject *obj, JSObject *unsafeObj,
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
// The constructor and toString properties needs to live on the safe
@ -498,7 +498,7 @@ XPC_SJOW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return XPCWrapper::AddProperty(cx, obj, unsafeObj, id, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *unsafeObj = GetUnsafeObject(obj);
@ -519,7 +519,7 @@ XPC_SJOW_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
// objects in a scripted function (see XPC_SJOW_Call()). The first
// argument passed to this method is the unsafe function to call, the
// rest are the arguments to pass to the function we're calling.
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_CallWrapper(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -587,19 +587,19 @@ XPC_SJOW_GetOrSetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp,
return ok && WrapJSValue(cx, obj, val, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return XPC_SJOW_GetOrSetProperty(cx, obj, id, vp, PR_FALSE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return XPC_SJOW_GetOrSetProperty(cx, obj, id, vp, PR_TRUE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Enumerate(JSContext *cx, JSObject *obj)
{
obj = FindSafeObject(obj);
@ -631,7 +631,7 @@ XPC_SJOW_Enumerate(JSContext *cx, JSObject *obj)
return XPCWrapper::Enumerate(cx, obj, unsafeObj);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp)
{
@ -661,14 +661,14 @@ XPC_SJOW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
return XPCWrapper::NewResolve(cx, obj, unsafeObj, id, flags, objp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
NS_ASSERTION(type != JSTYPE_STRING, "toString failed us");
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_SJOW_Finalize(JSContext *cx, JSObject *obj)
{
// Release the reference to the cached principal if we have one.
@ -681,7 +681,7 @@ XPC_SJOW_Finalize(JSContext *cx, JSObject *obj)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_CheckAccess(JSContext *cx, JSObject *obj, jsval id,
JSAccessMode mode, jsval *vp)
{
@ -714,7 +714,7 @@ XPC_SJOW_CheckAccess(JSContext *cx, JSObject *obj, jsval id,
clazz->checkAccess(cx, unsafeObj, id, mode, vp);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -945,7 +945,7 @@ XPC_SJOW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
{
if (JSVAL_IS_PRIMITIVE(v)) {
@ -976,7 +976,7 @@ XPC_SJOW_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_SJOW_Iterator(JSContext *cx, JSObject *obj, JSBool keysonly)
{
obj = FindSafeObject(obj);
@ -1015,13 +1015,13 @@ XPC_SJOW_Iterator(JSContext *cx, JSObject *obj, JSBool keysonly)
keysonly);
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_SJOW_WrappedObject(JSContext *cx, JSObject *obj)
{
return GetUnsafeObject(obj);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_SJOW_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{

Просмотреть файл

@ -55,7 +55,7 @@ XPCWrapper::sNumSlots = 2;
JSNative
XPCWrapper::sEvalNative = nsnull;
JS_STATIC_DLL_CALLBACK(void)
static void
IteratorFinalize(JSContext *cx, JSObject *obj)
{
jsval v;
@ -67,7 +67,7 @@ IteratorFinalize(JSContext *cx, JSObject *obj)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
IteratorNext(JSContext *cx, uintN argc, jsval *vp)
{
JSObject *obj;

Просмотреть файл

@ -425,7 +425,7 @@ static PRBool gInCollection;
// Whether cycle collection collected anything.
static PRBool gCollected;
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPCCycleCollectGCCallback(JSContext *cx, JSGCStatus status)
{
// Launch the cycle collector.
@ -554,7 +554,7 @@ struct NoteJSRootTracer : public JSTracer
nsCycleCollectionTraversalCallback& mCb;
};
JS_STATIC_DLL_CALLBACK(void)
static void
NoteJSRoot(JSTracer *trc, void *thing, uint32 kind)
{
if(ADD_TO_CC(kind))
@ -719,7 +719,7 @@ struct TraversalTracer : public JSTracer
nsCycleCollectionTraversalCallback &cb;
};
JS_STATIC_DLL_CALLBACK(void)
static void
NoteJSChild(JSTracer *trc, void *thing, uint32 kind)
{
if(ADD_TO_CC(kind))
@ -1113,7 +1113,7 @@ nsXPConnect::InitClasses(JSContext * aJSContext, JSObject * aGlobalJSObj)
return NS_OK;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
TempGlobalResolve(JSContext *aJSContext, JSObject *obj, jsval id)
{
JSBool resolved;
@ -1406,7 +1406,7 @@ nsXPConnect::ReparentWrappedNativeIfFound(JSContext * aJSContext,
(XPCWrappedNative**) _retval);
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
MoveableWrapperFinder(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{

Просмотреть файл

@ -2969,7 +2969,7 @@ PrincipalHolder::GetPrincipal()
return mHoldee;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
SandboxDump(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
JSString *str;
@ -2988,7 +2988,7 @@ SandboxDump(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
SandboxDebug(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
#ifdef DEBUG
@ -2998,7 +2998,7 @@ SandboxDebug(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
#endif
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
SandboxFunForwarder(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -3015,7 +3015,7 @@ SandboxFunForwarder(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
SandboxImport(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -3081,20 +3081,20 @@ SandboxImport(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return JS_SetReservedSlot(cx, newfunobj, 0, argv[0]);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
sandbox_enumerate(JSContext *cx, JSObject *obj)
{
return JS_EnumerateStandardClasses(cx, obj);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
sandbox_resolve(JSContext *cx, JSObject *obj, jsval id)
{
JSBool resolved;
return JS_ResolveStandardClass(cx, obj, id, &resolved);
}
JS_STATIC_DLL_CALLBACK(void)
static void
sandbox_finalize(JSContext *cx, JSObject *obj)
{
nsIScriptObjectPrincipal *sop =
@ -3344,7 +3344,7 @@ public:
NS_DECL_ISUPPORTS
private:
static JSBool JS_DLL_CALLBACK ContextHolderOperationCallback(JSContext *cx);
static JSBool ContextHolderOperationCallback(JSContext *cx);
XPCAutoJSContext mJSContext;
JSContext* mOrigCx;
@ -3372,7 +3372,7 @@ ContextHolder::ContextHolder(JSContext *aOuterCx, JSObject *aSandbox)
}
}
JSBool JS_DLL_CALLBACK
JSBool
ContextHolder::ContextHolderOperationCallback(JSContext *cx)
{
ContextHolder* thisObject =

Просмотреть файл

@ -165,7 +165,7 @@ XPCConvert::GetISupportsFromJSObject(JSObject* obj, nsISupports** iface)
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(void)
static void
FinalizeXPCOMUCString(JSContext *cx, JSString *str)
{
NS_ASSERTION(sXPCOMUCStringFinalizerIndex != -1,
@ -1645,7 +1645,7 @@ XPCConvert::JSErrorToXPCException(XPCCallContext& ccx,
// We assert below that these formats all begin with "%i".
const char* XPC_ARG_FORMATTER_FORMAT_STRINGS[] = {"%ip", "%iv", "%is", nsnull};
JSBool JS_DLL_CALLBACK
JSBool
XPC_JSArgumentFormatter(JSContext *cx, const char *format,
JSBool fromJS, jsval **vpp, va_list *app)
{

Просмотреть файл

@ -305,7 +305,7 @@ xpc_DumpJSStack(JSContext* cx, JSBool showArgs, JSBool showLocals, JSBool showTh
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(void)
static void
xpcDumpEvalErrorReporter(JSContext *cx, const char *message,
JSErrorReport *report)
{
@ -363,7 +363,7 @@ xpc_DumpEvalInJSStackFrame(JSContext* cx, JSUint32 frameno, const char* text)
/***************************************************************************/
JSTrapStatus JS_DLL_CALLBACK
JSTrapStatus
xpc_DebuggerKeywordHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
jsval *rval, void *closure)
{

Просмотреть файл

@ -83,7 +83,7 @@ struct JSDyingJSObjectData
nsVoidArray* array;
};
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedJSDyingJSObjectFinder(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -110,7 +110,7 @@ struct CX_AND_XPCRT_Data
XPCJSRuntime* rt;
};
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
NativeInterfaceGC(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -120,7 +120,7 @@ NativeInterfaceGC(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
NativeInterfaceSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -146,7 +146,7 @@ NativeInterfaceSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
// So, in mClassInfo2NativeSetMap we just clear references to the unmarked.
// In mNativeSetMap we clear the references to the unmarked *and* delete them.
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
NativeUnMarkedSetRemover(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -156,7 +156,7 @@ NativeUnMarkedSetRemover(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_REMOVE;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
NativeSetSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -181,7 +181,7 @@ NativeSetSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_REMOVE;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
JSClassSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -208,7 +208,7 @@ JSClassSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_REMOVE;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
DyingProtoKiller(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -218,7 +218,7 @@ DyingProtoKiller(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_REMOVE;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
DetachedWrappedNativeProtoMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -230,7 +230,7 @@ DetachedWrappedNativeProtoMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
}
// GCCallback calls are chained
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
ContextCallback(JSContext *cx, uintN operation)
{
XPCJSRuntime* self = nsXPConnect::GetRuntime();
@ -339,7 +339,7 @@ TraceJSObject(PRUint32 aLangID, void *aScriptThing, void *aClosure)
}
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
TraceJSHolder(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
void *arg)
{
@ -388,7 +388,7 @@ void XPCJSRuntime::TraceXPConnectRoots(JSTracer *trc)
JS_DHashTableEnumerate(&mJSHolders, TraceJSHolder, trc);
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
NoteJSHolder(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
void *arg)
{
@ -834,7 +834,7 @@ JSBool XPCJSRuntime::GCCallback(JSContext *cx, JSGCStatus status)
/***************************************************************************/
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
DEBUG_WrapperChecker(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -845,7 +845,7 @@ DEBUG_WrapperChecker(JSDHashTable *table, JSDHashEntryHdr *hdr,
}
#endif
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedJSShutdownMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -857,7 +857,7 @@ WrappedJSShutdownMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
DetachedWrappedNativeProtoShutdownMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -1149,7 +1149,7 @@ XPCJSRuntime::GetXPCContext(JSContext* cx)
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
SweepContextsCB(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -1216,7 +1216,7 @@ XPCJSRuntime::SyncXPCContextList(JSContext* cx /* = nsnull */)
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
PurgeContextsCB(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -1270,28 +1270,28 @@ XPCJSRuntime::DeferredRelease(nsISupports* obj)
/***************************************************************************/
#ifdef DEBUG
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
ContextMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
((JSContext2XPCContextMap::Entry*)hdr)->value->DebugDump(*(PRInt16*)arg);
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedJSClassMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
((IID2WrappedJSClassMap::Entry*)hdr)->value->DebugDump(*(PRInt16*)arg);
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedJSMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
((JSObject2WrappedJSMap::Entry*)hdr)->value->DebugDump(*(PRInt16*)arg);
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
NativeSetDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{

Просмотреть файл

@ -49,13 +49,13 @@
// Note this is returning the bit pattern of the first part of the nsID, not
// the pointer to the nsID.
static JSDHashNumber JS_DLL_CALLBACK
static JSDHashNumber
HashIIDPtrKey(JSDHashTable *table, const void *key)
{
return *((JSHashNumber*)key);
}
static JSBool JS_DLL_CALLBACK
static JSBool
MatchIIDPtrKey(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key)
@ -64,7 +64,7 @@ MatchIIDPtrKey(JSDHashTable *table,
Equals(*((const nsID*)((JSDHashEntryStub*)entry)->key));
}
static JSDHashNumber JS_DLL_CALLBACK
static JSDHashNumber
HashNativeKey(JSDHashTable *table, const void *key)
{
XPCNativeSetKey* Key = (XPCNativeSetKey*) key;
@ -327,7 +327,7 @@ ClassInfo2WrappedNativeProtoMap::~ClassInfo2WrappedNativeProtoMap()
/***************************************************************************/
// implement NativeSetMap...
JSBool JS_DLL_CALLBACK
JSBool
NativeSetMap::Entry::Match(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key)
@ -442,7 +442,7 @@ NativeSetMap::~NativeSetMap()
/***************************************************************************/
// implement IID2ThisTranslatorMap...
JSBool JS_DLL_CALLBACK
JSBool
IID2ThisTranslatorMap::Entry::Match(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key)
@ -450,7 +450,7 @@ IID2ThisTranslatorMap::Entry::Match(JSDHashTable *table,
return ((const nsID*)key)->Equals(((Entry*)entry)->key);
}
void JS_DLL_CALLBACK
void
IID2ThisTranslatorMap::Entry::Clear(JSDHashTable *table, JSDHashEntryHdr *entry)
{
NS_IF_RELEASE(((Entry*)entry)->value);
@ -492,7 +492,7 @@ IID2ThisTranslatorMap::~IID2ThisTranslatorMap()
/***************************************************************************/
JSDHashNumber JS_DLL_CALLBACK
JSDHashNumber
XPCNativeScriptableSharedMap::Entry::Hash(JSDHashTable *table, const void *key)
{
JSDHashNumber h;
@ -509,7 +509,7 @@ XPCNativeScriptableSharedMap::Entry::Hash(JSDHashTable *table, const void *key)
return h;
}
JSBool JS_DLL_CALLBACK
JSBool
XPCNativeScriptableSharedMap::Entry::Match(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key)

Просмотреть файл

@ -457,7 +457,7 @@ public:
{
XPCNativeSet* key_value;
static JSBool JS_DLL_CALLBACK
static JSBool
Match(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key);
@ -526,12 +526,12 @@ public:
nsIID key;
nsIXPCFunctionThisTranslator* value;
static JSBool JS_DLL_CALLBACK
static JSBool
Match(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key);
static void JS_DLL_CALLBACK
static void
Clear(JSDHashTable *table, JSDHashEntryHdr *entry);
static struct JSDHashTableOps sOps;
@ -589,10 +589,10 @@ public:
{
XPCNativeScriptableShared* key;
static JSDHashNumber JS_DLL_CALLBACK
static JSDHashNumber
Hash(JSDHashTable *table, const void *key);
static JSBool JS_DLL_CALLBACK
static JSBool
Match(JSDHashTable *table,
const JSDHashEntryHdr *entry,
const void *key);

Просмотреть файл

@ -709,12 +709,12 @@ public:
return mStrings[index];
}
static void JS_DLL_CALLBACK TraceJS(JSTracer* trc, void* data);
static void TraceJS(JSTracer* trc, void* data);
void TraceXPConnectRoots(JSTracer *trc);
void AddXPConnectRoots(JSContext* cx,
nsCycleCollectionTraversalCallback& cb);
static JSBool JS_DLL_CALLBACK GCCallback(JSContext *cx, JSGCStatus status);
static JSBool GCCallback(JSContext *cx, JSGCStatus status);
inline void AddVariantRoot(XPCTraceableVariant* variant);
inline void AddWrappedJSRoot(nsXPCWrappedJS* wrappedJS);
@ -1171,20 +1171,20 @@ extern JSClass XPC_WN_ModsAllowed_NoCall_Proto_JSClass;
extern JSClass XPC_WN_Tearoff_JSClass;
extern JSClass XPC_WN_NoHelper_Proto_JSClass;
extern JSObjectOps * JS_DLL_CALLBACK
extern JSObjectOps *
XPC_WN_GetObjectOpsNoCall(JSContext *cx, JSClass *clazz);
extern JSObjectOps * JS_DLL_CALLBACK
extern JSObjectOps *
XPC_WN_GetObjectOpsWithCall(JSContext *cx, JSClass *clazz);
extern JSObjectOps * JS_DLL_CALLBACK
extern JSObjectOps *
XPC_WN_Proto_GetObjectOps(JSContext *cx, JSClass *clazz);
extern JSBool JS_DLL_CALLBACK
extern JSBool
XPC_WN_CallMethod(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *vp);
extern JSBool JS_DLL_CALLBACK
extern JSBool
XPC_WN_GetterSetter(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *vp);
@ -2801,7 +2801,7 @@ private:
XPCStringConvert(); // not implemented
};
extern JSBool JS_DLL_CALLBACK
extern JSBool
XPC_JSArgumentFormatter(JSContext *cx, const char *format,
JSBool fromJS, jsval **vpp, va_list *app);

Просмотреть файл

@ -57,7 +57,7 @@
static int sDOMStringFinalizerIndex = -1;
static void JS_DLL_CALLBACK
static void
DOMStringFinalizer(JSContext *cx, JSString *str)
{
nsStringBuffer::FromData(JS_GetStringChars(str))->Release();

Просмотреть файл

@ -153,14 +153,14 @@ XPCJSContextStack::DEBUG_StackHasJSContext(JSContext* aJSContext)
}
#endif
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
SafeGlobalResolve(JSContext *cx, JSObject *obj, jsval id)
{
JSBool resolved;
return JS_ResolveStandardClass(cx, obj, id, &resolved);
}
JS_STATIC_DLL_CALLBACK(void)
static void
SafeFinalize(JSContext* cx, JSObject* obj)
{
#ifndef XPCONNECT_STANDALONE

Просмотреть файл

@ -710,7 +710,7 @@ nsXPCWrappedJSClass::GetRootJSObject(XPCCallContext& ccx, JSObject* aJSObj)
return result ? result : aJSObj;
}
void JS_DLL_CALLBACK
void
xpcWrappedJSErrorReporter(JSContext *cx, const char *message,
JSErrorReport *report)
{

Просмотреть файл

@ -119,7 +119,7 @@ ToStringGuts(XPCCallContext& ccx)
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Shared_ToString(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *vp)
{
@ -129,7 +129,7 @@ XPC_WN_Shared_ToString(JSContext *cx, JSObject *obj,
return ToStringGuts(ccx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Shared_ToSource(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *vp)
{
@ -178,7 +178,7 @@ GetDoubleWrappedJSObject(XPCCallContext& ccx, XPCWrappedNative* wrapper)
// This is the getter native function we use to handle 'wrappedJSObject' for
// double wrapped JSObjects.
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_DoubleWrappedGetter(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *vp)
{
@ -491,7 +491,7 @@ DefinePropertyIfFound(XPCCallContext& ccx,
/***************************************************************************/
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_OnlyIWrite_PropertyStub(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
CHECK_IDVAL(cx, idval);
@ -507,14 +507,14 @@ XPC_WN_OnlyIWrite_PropertyStub(JSContext *cx, JSObject *obj, jsval idval, jsval
return Throw(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN, cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_CannotModifyPropertyStub(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
CHECK_IDVAL(cx, idval);
return Throw(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN, cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Shared_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
if(type == JSTYPE_OBJECT)
@ -576,7 +576,7 @@ XPC_WN_Shared_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
return JS_FALSE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Shared_Enumerate(JSContext *cx, JSObject *obj)
{
XPCCallContext ccx(JS_CALLER, cx, obj);
@ -631,7 +631,7 @@ XPC_WN_Shared_Enumerate(JSContext *cx, JSObject *obj)
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_NoHelper_Finalize(JSContext *cx, JSObject *obj)
{
XPCWrappedNative* p = (XPCWrappedNative*) xpc_GetJSPrivate(obj);
@ -695,7 +695,7 @@ xpc_TraceForValidWrapper(JSTracer *trc, XPCWrappedNative* wrapper)
TraceScopeJSObjects(trc, wrapper->GetScope());
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_Shared_Trace(JSTracer *trc, JSObject *obj)
{
XPCWrappedNative* wrapper =
@ -705,7 +705,7 @@ XPC_WN_Shared_Trace(JSTracer *trc, JSObject *obj)
xpc_TraceForValidWrapper(trc, wrapper);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_NoHelper_Resolve(JSContext *cx, JSObject *obj, jsval idval)
{
CHECK_IDVAL(cx, idval);
@ -751,7 +751,7 @@ XPC_GetIdentityObject(JSContext *cx, JSObject *obj)
return wrapper->GetIdentityObject();
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
{
*bp = JS_FALSE;
@ -789,7 +789,7 @@ XPC_WN_Equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_WN_OuterObject(JSContext *cx, JSObject *obj)
{
XPCWrappedNative *wrapper =
@ -828,7 +828,7 @@ XPC_WN_OuterObject(JSContext *cx, JSObject *obj)
return obj;
}
JS_STATIC_DLL_CALLBACK(JSObject *)
static JSObject *
XPC_WN_InnerObject(JSContext *cx, JSObject *obj)
{
XPCWrappedNative *wrapper =
@ -905,7 +905,7 @@ JSExtendedClass XPC_WN_NoHelper_JSClass = {
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_MaybeResolvingPropertyStub(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
CHECK_IDVAL(cx, idval);
@ -931,7 +931,7 @@ XPC_WN_MaybeResolvingPropertyStub(JSContext *cx, JSObject *obj, jsval idval, jsv
return Throw(rv, cx); \
return retval;
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_AddProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
PRE_HELPER_STUB
@ -939,7 +939,7 @@ XPC_WN_Helper_AddProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_DelProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
PRE_HELPER_STUB
@ -947,7 +947,7 @@ XPC_WN_Helper_DelProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_GetProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
PRE_HELPER_STUB
@ -955,7 +955,7 @@ XPC_WN_Helper_GetProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_SetProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
PRE_HELPER_STUB
@ -963,7 +963,7 @@ XPC_WN_Helper_SetProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
PRE_HELPER_STUB
@ -971,7 +971,7 @@ XPC_WN_Helper_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_CheckAccess(JSContext *cx, JSObject *obj, jsval idval,
JSAccessMode mode, jsval *vp)
{
@ -981,7 +981,7 @@ XPC_WN_Helper_CheckAccess(JSContext *cx, JSObject *obj, jsval idval,
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -995,7 +995,7 @@ XPC_WN_Helper_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -1009,7 +1009,7 @@ XPC_WN_Helper_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
{
PRE_HELPER_STUB
@ -1017,7 +1017,7 @@ XPC_WN_Helper_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
POST_HELPER_STUB
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_Helper_Finalize(JSContext *cx, JSObject *obj)
{
XPCWrappedNative* wrapper = (XPCWrappedNative*) xpc_GetJSPrivate(obj);
@ -1027,7 +1027,7 @@ XPC_WN_Helper_Finalize(JSContext *cx, JSObject *obj)
wrapper->FlatJSObjectFinalized(cx);
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_Helper_Trace(JSTracer *trc, JSObject *obj)
{
XPCWrappedNative* wrapper =
@ -1039,7 +1039,7 @@ XPC_WN_Helper_Trace(JSTracer *trc, JSObject *obj)
}
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Helper_NewResolve(JSContext *cx, JSObject *obj, jsval idval, uintN flags,
JSObject **objp)
{
@ -1170,7 +1170,7 @@ static JSObjectOps XPC_WN_NoCall_JSOps;
do shared enumerate - don't use this JSOp thing at all
*/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_JSOp_Enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp)
{
@ -1250,7 +1250,7 @@ XPC_WN_JSOp_Enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
return js_ObjectOps.enumerate(cx, obj, enum_op, statep, idp);
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_JSOp_Clear(JSContext *cx, JSObject *obj)
{
// We're likely to enter this JSOp with a wrapper prototype
@ -1273,13 +1273,13 @@ XPC_WN_JSOp_Clear(JSContext *cx, JSObject *obj)
js_ObjectOps.clear(cx, obj);
}
JSObjectOps * JS_DLL_CALLBACK
JSObjectOps *
XPC_WN_GetObjectOpsNoCall(JSContext *cx, JSClass *clazz)
{
return &XPC_WN_NoCall_JSOps;
}
JSObjectOps * JS_DLL_CALLBACK
JSObjectOps *
XPC_WN_GetObjectOpsWithCall(JSContext *cx, JSClass *clazz)
{
return &XPC_WN_WithCall_JSOps;
@ -1454,7 +1454,7 @@ XPCNativeScriptableShared::PopulateJSClass(JSBool isGlobal)
/***************************************************************************/
/***************************************************************************/
JSBool JS_DLL_CALLBACK
JSBool
XPC_WN_CallMethod(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *vp)
{
@ -1473,7 +1473,7 @@ XPC_WN_CallMethod(JSContext *cx, JSObject *obj,
return XPCWrappedNative::CallMethod(ccx);
}
JSBool JS_DLL_CALLBACK
JSBool
XPC_WN_GetterSetter(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *vp)
{
@ -1507,7 +1507,7 @@ XPC_WN_GetterSetter(JSContext *cx, JSObject *obj,
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Shared_Proto_Enumerate(JSContext *cx, JSObject *obj)
{
NS_ASSERTION(
@ -1552,14 +1552,14 @@ XPC_WN_Shared_Proto_Enumerate(JSContext *cx, JSObject *obj)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_Shared_Proto_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
// XXX ?
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_Shared_Proto_Finalize(JSContext *cx, JSObject *obj)
{
// This can be null if xpc shutdown has already happened
@ -1568,7 +1568,7 @@ XPC_WN_Shared_Proto_Finalize(JSContext *cx, JSObject *obj)
p->JSProtoObjectFinalized(cx, obj);
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_Shared_Proto_Trace(JSTracer *trc, JSObject *obj)
{
// This can be null if xpc shutdown has already happened
@ -1580,7 +1580,7 @@ XPC_WN_Shared_Proto_Trace(JSTracer *trc, JSObject *obj)
/*****************************************************/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_ModsAllowed_Proto_Resolve(JSContext *cx, JSObject *obj, jsval idval)
{
CHECK_IDVAL(cx, idval);
@ -1617,7 +1617,7 @@ XPC_WN_ModsAllowed_Proto_Resolve(JSContext *cx, JSObject *obj, jsval idval)
// wrappers. This essentially duplicates the number of JSClasses we
// use for prototype objects (from 2 to 4), but the scope sharing
// benefit is well worth it.
JSObjectOps * JS_DLL_CALLBACK
JSObjectOps *
XPC_WN_Proto_GetObjectOps(JSContext *cx, JSClass *clazz)
{
// Protos for wrappers that want calls to their call() hooks get
@ -1660,7 +1660,7 @@ JSClass XPC_WN_ModsAllowed_WithCall_Proto_JSClass = {
nsnull // spare;
};
JSObjectOps * JS_DLL_CALLBACK
JSObjectOps *
XPC_WN_ModsAllowedProto_NoCall_GetObjectOps(JSContext *cx, JSClass *clazz)
{
return &XPC_WN_NoCall_JSOps;
@ -1693,7 +1693,7 @@ JSClass XPC_WN_ModsAllowed_NoCall_Proto_JSClass = {
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_OnlyIWrite_Proto_PropertyStub(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
{
CHECK_IDVAL(cx, idval);
@ -1719,7 +1719,7 @@ XPC_WN_OnlyIWrite_Proto_PropertyStub(JSContext *cx, JSObject *obj, jsval idval,
return Throw(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO, cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_NoMods_Proto_Resolve(JSContext *cx, JSObject *obj, jsval idval)
{
CHECK_IDVAL(cx, idval);
@ -1803,7 +1803,7 @@ JSClass XPC_WN_NoMods_NoCall_Proto_JSClass = {
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_TearOff_Enumerate(JSContext *cx, JSObject *obj)
{
XPCCallContext ccx(JS_CALLER, cx, obj);
@ -1826,7 +1826,7 @@ XPC_WN_TearOff_Enumerate(JSContext *cx, JSObject *obj)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
XPC_WN_TearOff_Resolve(JSContext *cx, JSObject *obj, jsval idval)
{
CHECK_IDVAL(cx, idval);
@ -1849,7 +1849,7 @@ XPC_WN_TearOff_Resolve(JSContext *cx, JSObject *obj, jsval idval)
JSPROP_ENUMERATE, nsnull);
}
JS_STATIC_DLL_CALLBACK(void)
static void
XPC_WN_TearOff_Finalize(JSContext *cx, JSObject *obj)
{
XPCWrappedNativeTearOff* p = (XPCWrappedNativeTearOff*)

Просмотреть файл

@ -350,7 +350,7 @@ XPCWrappedNativeScope::GetPrototypeNoHelper(XPCCallContext& ccx)
return mPrototypeNoHelper;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeJSGCThingTracer(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -391,7 +391,7 @@ struct SuspectClosure
nsCycleCollectionTraversalCallback& cb;
};
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeSuspecter(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -504,7 +504,7 @@ XPCWrappedNativeScope::FinishedFinalizationPhaseOfGC(JSContext* cx)
KillDyingScopes();
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -514,7 +514,7 @@ WrappedNativeMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
// We need to explicitly mark all the protos too because some protos may be
// alive in the hashtable but not currently in use by any wrapper
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeProtoMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -536,7 +536,7 @@ XPCWrappedNativeScope::MarkAllWrappedNativesAndProtos()
}
#ifdef DEBUG
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
ASSERT_WrappedNativeSetNotMarked(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -544,7 +544,7 @@ ASSERT_WrappedNativeSetNotMarked(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
ASSERT_WrappedNativeProtoSetNotMarked(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -566,7 +566,7 @@ XPCWrappedNativeScope::ASSERT_NoInterfaceSetsAreMarked()
}
#endif
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeTearoffSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -610,7 +610,7 @@ struct ShutdownData
int nonSharedProtoCount;
};
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeShutdownEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -627,7 +627,7 @@ WrappedNativeShutdownEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_REMOVE;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeProtoShutdownEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -824,7 +824,7 @@ XPCWrappedNativeScope::FindInJSObjectScope(XPCCallContext& ccx, JSObject* obj,
/***************************************************************************/
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WNProtoSecPolicyClearer(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -834,7 +834,7 @@ WNProtoSecPolicyClearer(JSDHashTable *table, JSDHashEntryHdr *hdr,
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WNSecPolicyClearer(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -862,7 +862,7 @@ XPCWrappedNativeScope::ClearAllWrappedNativeSecurityPolicies(XPCCallContext& ccx
return NS_OK;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WNProtoRemover(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
@ -911,14 +911,14 @@ XPCWrappedNativeScope::DebugDumpAllScopes(PRInt16 depth)
}
#ifdef DEBUG
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{
((Native2WrappedNativeMap::Entry*)hdr)->value->DebugDump(*(PRInt16*)arg);
return JS_DHASH_NEXT;
}
JS_STATIC_DLL_CALLBACK(JSDHashOperator)
static JSDHashOperator
WrappedNativeProtoMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
uint32 number, void *arg)
{

Просмотреть файл

@ -68,7 +68,7 @@
FILE *gOutFile = NULL;
FILE *gErrFile = NULL;
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
uintN i, n;
@ -86,7 +86,7 @@ Print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
Load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
uintN i;
@ -127,7 +127,7 @@ static JSClass global_class = {
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub
};
JS_STATIC_DLL_CALLBACK(void)
static void
my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
{
printf(message);

Просмотреть файл

@ -69,7 +69,7 @@ NS_IMETHODIMP nsXPCToolsCompiler::GetBinDir(nsILocalFile * *aBinDir)
return NS_OK;
}
JS_STATIC_DLL_CALLBACK(void) ErrorReporter(JSContext *cx, const char *message,
static void ErrorReporter(JSContext *cx, const char *message,
JSErrorReport *report)
{
printf("compile error!\n");

Просмотреть файл

@ -130,7 +130,7 @@ nsXPCToolsProfiler::~nsXPCToolsProfiler()
// the hooks...
/* called just after script creation */
JS_STATIC_DLL_CALLBACK(void)
static void
xpctools_JSNewScriptHook(JSContext *cx,
const char *filename, /* URL of script */
uintN lineno, /* line script starts */
@ -172,7 +172,7 @@ xpctools_JSNewScriptHook(JSContext *cx,
}
/* called just before script destruction */
JS_STATIC_DLL_CALLBACK(void)
static void
xpctools_JSDestroyScriptHook(JSContext *cx,
JSScript *script,
void *callerdata)
@ -188,7 +188,7 @@ xpctools_JSDestroyScriptHook(JSContext *cx,
/* called on entry and return of functions and top level scripts */
JS_STATIC_DLL_CALLBACK(void*)
static void*
xpctools_InterpreterHook(JSContext *cx, JSStackFrame *fp, JSBool before,
JSBool *ok, void *closure)
{

Просмотреть файл

@ -122,7 +122,7 @@ JS_BEGIN_EXTERN_C
#include "jscntxt.h"
JS_STATIC_DLL_CALLBACK(JSContext*)
static JSContext*
map_jsj_thread_to_js_context_impl(JSJavaThreadState *jsj_env, void* java_applet_obj, JNIEnv *env, char **errp)
{
// Guess what? This design is totally invalid under Gecko, because there isn't a 1 to 1 mapping
@ -150,7 +150,7 @@ map_jsj_thread_to_js_context_impl(JSJavaThreadState *jsj_env, void* java_applet_
** to a java thread. JSJ_AttachCurrentThreadToJava just calls AttachCurrentThread
** on the java vm.
*/
JS_STATIC_DLL_CALLBACK(JSJavaThreadState*)
static JSJavaThreadState*
map_js_context_to_jsj_thread_impl(JSContext *cx, char **errp)
{
*errp = NULL;
@ -192,7 +192,7 @@ map_js_context_to_jsj_thread_impl(JSContext *cx, char **errp)
** to get to the javascript JSObject.
*/
JS_STATIC_DLL_CALLBACK(JSObject*)
static JSObject*
map_java_object_to_js_object_impl(JNIEnv *env, void *pluginInstancePtr, char* *errp)
{
JSObject *window = NULL;
@ -245,7 +245,7 @@ map_java_object_to_js_object_impl(JNIEnv *env, void *pluginInstancePtr, char* *e
return window;
}
JS_STATIC_DLL_CALLBACK(JSPrincipals*)
static JSPrincipals*
get_JSPrincipals_from_java_caller_impl(JNIEnv *pJNIEnv, JSContext *pJSContext, void **ppNSIPrincipalArrayIN, int numPrincipals, void *pNSISecurityContext)
{
nsresult rv;
@ -265,7 +265,7 @@ get_JSPrincipals_from_java_caller_impl(JNIEnv *pJNIEnv, JSContext *pJSContext, v
return jsprincipals;
}
JS_STATIC_DLL_CALLBACK(jobject)
static jobject
get_java_wrapper_impl(JNIEnv *pJNIEnv, lcjsobject a_jsobject)
{
nsresult err = NS_OK;
@ -286,7 +286,7 @@ get_java_wrapper_impl(JNIEnv *pJNIEnv, lcjsobject a_jsobject)
return pJSObjectWrapper;
}
JS_STATIC_DLL_CALLBACK(lcjsobject)
static lcjsobject
unwrap_java_wrapper_impl(JNIEnv *pJNIEnv, jobject java_wrapper)
{
lcjsobject obj = 0;
@ -307,7 +307,7 @@ unwrap_java_wrapper_impl(JNIEnv *pJNIEnv, jobject java_wrapper)
return obj;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
enter_js_from_java_impl(JNIEnv *jEnv, char **errp,
void **pNSIPrincipaArray, int numPrincipals,
void *pNSISecurityContext,
@ -316,7 +316,7 @@ enter_js_from_java_impl(JNIEnv *jEnv, char **errp,
return PR_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
exit_js_impl(JNIEnv *jEnv, JSContext *cx)
{
// The main idea is to execute terminate function if have any;
@ -332,7 +332,7 @@ exit_js_impl(JNIEnv *jEnv, JSContext *cx)
return;
}
JS_STATIC_DLL_CALLBACK(PRBool)
static PRBool
create_java_vm_impl(SystemJavaVM* *jvm, JNIEnv* *initialEnv, void* initargs)
{
// const char* classpath = (const char*)initargs;
@ -348,7 +348,7 @@ create_java_vm_impl(SystemJavaVM* *jvm, JNIEnv* *initialEnv, void* initargs)
return PR_TRUE;
}
JS_STATIC_DLL_CALLBACK(PRBool)
static PRBool
destroy_java_vm_impl(SystemJavaVM* jvm, JNIEnv* initialEnv)
{
JVM_ReleaseJNIEnv(initialEnv);
@ -356,20 +356,20 @@ destroy_java_vm_impl(SystemJavaVM* jvm, JNIEnv* initialEnv)
return PR_TRUE;
}
JS_STATIC_DLL_CALLBACK(JNIEnv*)
static JNIEnv*
attach_current_thread_impl(SystemJavaVM* jvm)
{
return JVM_GetJNIEnv();
}
JS_STATIC_DLL_CALLBACK(PRBool)
static PRBool
detach_current_thread_impl(SystemJavaVM* jvm, JNIEnv* env)
{
JVM_ReleaseJNIEnv(env);
return PR_TRUE;
}
JS_STATIC_DLL_CALLBACK(SystemJavaVM*)
static SystemJavaVM*
get_java_vm_impl(JNIEnv* env)
{
// only one SystemJavaVM for the whole browser, so it doesn't depend on env

Просмотреть файл

@ -118,37 +118,37 @@ NPClass nsJSObjWrapper::sJSObjWrapperNPClass =
nsJSObjWrapper::NP_Construct
};
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
JS_STATIC_DLL_CALLBACK(void)
static void
NPObjWrapper_Finalize(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);
@ -175,17 +175,17 @@ typedef struct NPObjectMemberPrivate {
NPP npp;
} NPObjectMemberPrivate;
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjectMember_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
JS_STATIC_DLL_CALLBACK(void)
static void
NPObjectMember_Finalize(JSContext *cx, JSObject *obj);
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjectMember_Call(JSContext *cx, JSObject *obj, uintN argc,
jsval *argv, jsval *rval);
JS_STATIC_DLL_CALLBACK(uint32)
static uint32
NPObjectMember_Mark(JSContext *cx, JSObject *obj, void *arg);
static JSClass sNPObjectMemberClass =
@ -1136,7 +1136,7 @@ GetNPObject(JSContext *cx, JSObject *obj)
return (NPObject *)::JS_GetPrivate(cx, obj);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
NPObject *npobj = GetNPObject(cx, obj);
@ -1161,7 +1161,7 @@ NPObjWrapper_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return ReportExceptionIfPending(cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
NPObject *npobj = GetNPObject(cx, obj);
@ -1182,7 +1182,7 @@ NPObjWrapper_DelProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return ReportExceptionIfPending(cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
NPObject *npobj = GetNPObject(cx, obj);
@ -1233,7 +1233,7 @@ NPObjWrapper_SetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return ReportExceptionIfPending(cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
NPObject *npobj = GetNPObject(cx, obj);
@ -1286,7 +1286,7 @@ NPObjWrapper_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return ReportExceptionIfPending(cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
CallNPMethodInternal(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval, PRBool ctorCall)
{
@ -1418,7 +1418,7 @@ CallNPMethodInternal(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return ReportExceptionIfPending(cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
CallNPMethod(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -1431,7 +1431,7 @@ struct NPObjectEnumerateState {
NPIdentifier *value;
};
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
jsval *statep, jsid *idp)
{
@ -1502,7 +1502,7 @@ NPObjWrapper_newEnumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
JSObject **objp)
{
@ -1564,7 +1564,7 @@ NPObjWrapper_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
return ReportExceptionIfPending(cx);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
// The sole reason we implement this hook is to prevent the JS
@ -1576,7 +1576,7 @@ NPObjWrapper_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
return JS_TRUE;
}
JS_STATIC_DLL_CALLBACK(void)
static void
NPObjWrapper_Finalize(JSContext *cx, JSObject *obj)
{
NPObject *npobj = (NPObject *)::JS_GetPrivate(cx, obj);
@ -1593,7 +1593,7 @@ NPObjWrapper_Finalize(JSContext *cx, JSObject *obj)
OnWrapperDestroyed();
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -1601,7 +1601,7 @@ NPObjWrapper_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
PR_FALSE);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjWrapper_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
{
@ -2035,7 +2035,7 @@ CreateNPObjectMember(NPP npp, JSContext *cx, JSObject *obj,
return true;
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjectMember_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
NPObjectMemberPrivate *memberPrivate =
@ -2061,7 +2061,7 @@ NPObjectMember_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
}
}
JS_STATIC_DLL_CALLBACK(void)
static void
NPObjectMember_Finalize(JSContext *cx, JSObject *obj)
{
NPObjectMemberPrivate *memberPrivate;
@ -2073,7 +2073,7 @@ NPObjectMember_Finalize(JSContext *cx, JSObject *obj)
PR_Free(memberPrivate);
}
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
NPObjectMember_Call(JSContext *cx, JSObject *obj,
uintN argc, jsval *argv, jsval *rval)
{
@ -2151,7 +2151,7 @@ NPObjectMember_Call(JSContext *cx, JSObject *obj,
return ReportExceptionIfPending(cx);
}
JS_STATIC_DLL_CALLBACK(uint32)
static uint32
NPObjectMember_Mark(JSContext *cx, JSObject *obj, void *arg)
{
NPObjectMemberPrivate *memberPrivate =

Просмотреть файл

@ -102,7 +102,7 @@ JSClass InstallTriggerGlobalClass = {
//
// InstallTriggerGlobal finalizer
//
JS_STATIC_DLL_CALLBACK(void)
static void
FinalizeInstallTriggerGlobal(JSContext *cx, JSObject *obj)
{
nsISupports *nativeThis = (nsISupports*)JS_GetPrivate(cx, obj);
@ -204,7 +204,7 @@ static nsIDOMInstallTriggerGlobal* getTriggerNative(JSContext *cx, JSObject *obj
//
// Native method UpdateEnabled
//
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
InstallTriggerGlobalUpdateEnabled(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMInstallTriggerGlobal *nativeThis = getTriggerNative(cx, obj);
@ -230,7 +230,7 @@ InstallTriggerGlobalUpdateEnabled(JSContext *cx, JSObject *obj, uintN argc, jsva
//
// Native method Install
//
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
InstallTriggerGlobalInstall(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMInstallTriggerGlobal *nativeThis = getTriggerNative(cx, obj);
@ -431,7 +431,7 @@ InstallTriggerGlobalInstall(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
//
// Native method InstallChrome
//
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
InstallTriggerGlobalInstallChrome(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMInstallTriggerGlobal *nativeThis = getTriggerNative(cx, obj);
@ -541,7 +541,7 @@ InstallTriggerGlobalInstallChrome(JSContext *cx, JSObject *obj, uintN argc, jsva
//
// Native method StartSoftwareUpdate
//
JS_STATIC_DLL_CALLBACK(JSBool)
static JSBool
InstallTriggerGlobalStartSoftwareUpdate(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMInstallTriggerGlobal *nativeThis = getTriggerNative(cx, obj);