diff --git a/js/jsd/jsd_xpc.cpp b/js/jsd/jsd_xpc.cpp index da0181c8203..a97e509b94c 100644 --- a/js/jsd/jsd_xpc.cpp +++ b/js/jsd/jsd_xpc.cpp @@ -95,7 +95,7 @@ #define APPSTART_CATEGORY "app-startup" #define PROFILE_CHANGE_EVENT "profile-after-change" -static JSBool +JS_STATIC_DLL_CALLBACK (JSBool) jsds_GCCallbackProc (JSContext *cx, JSGCStatus status); /******************************************************************************* @@ -187,7 +187,7 @@ jsds_RemoveEphemeral (LiveEphemeral **listHead, LiveEphemeral *item) * c callbacks *******************************************************************************/ -static void +JS_STATIC_DLL_CALLBACK (void) jsds_NotifyPendingDeadScripts (JSContext *cx) { nsCOMPtr hook = 0; @@ -224,7 +224,7 @@ jsds_NotifyPendingDeadScripts (JSContext *cx) gDeadScripts = 0; } -static JSBool +JS_STATIC_DLL_CALLBACK (JSBool) jsds_GCCallbackProc (JSContext *cx, JSGCStatus status) { gGCStatus = status; @@ -240,7 +240,7 @@ jsds_GCCallbackProc (JSContext *cx, JSGCStatus status) return JS_TRUE; } -static JSBool +JS_STATIC_DLL_CALLBACK (JSBool) jsds_EmptyCallHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate, uintN type, void* callerdata) { @@ -250,7 +250,7 @@ jsds_EmptyCallHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate, } -static JSBool +JS_STATIC_DLL_CALLBACK (JSBool) jsds_CallHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate, uintN type, void* callerdata) { @@ -285,7 +285,7 @@ jsds_CallHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate, return JS_TRUE; } -static PRUint32 +JS_STATIC_DLL_CALLBACK (PRUint32) jsds_ExecutionHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate, uintN type, void* callerdata, jsval* rval) { @@ -343,7 +343,7 @@ jsds_ExecutionHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate, return hook_rv; } -static void +JS_STATIC_DLL_CALLBACK (void) jsds_ScriptHookProc (JSDContext* jsdc, JSDScript* jsdscript, JSBool creating, void* callerdata) { @@ -620,7 +620,7 @@ jsdScript::jsdScript (JSDContext *aCx, JSDScript *aScript) : mValid(PR_FALSE), mLineExtent = JSD_GetScriptLineExtent(mCx, mScript); JSD_UnlockScriptSubsystem(mCx); - mValid = true; + mValid = PR_TRUE; } } diff --git a/js/jsd/jsdebug.h b/js/jsd/jsdebug.h index 71e69d29b2a..32adb3377cc 100644 --- a/js/jsd/jsdebug.h +++ b/js/jsd/jsdebug.h @@ -92,7 +92,7 @@ typedef struct JSDObject JSDObject; * up the JSD system. */ typedef void -(*JSD_SetContextProc)(JSDContext* jsdc, void* user); +(* JS_DLL_CALLBACK JSD_SetContextProc)(JSDContext* jsdc, void* user); /* This struct could have more fields in future versions */ typedef struct @@ -270,10 +270,10 @@ JSD_GetScriptLineExtent(JSDContext* jsdc, JSDScript *jsdscript); * 'callerdata' is what was passed to JSD_SetScriptHook to set the hook. */ typedef void -(*JSD_ScriptHookProc)(JSDContext* jsdc, - JSDScript* jsdscript, - JSBool creating, - void* callerdata); +(* JS_DLL_CALLBACK JSD_ScriptHookProc)(JSDContext* jsdc, + JSDScript* jsdscript, + JSBool creating, + void* callerdata); /* * Set a hook to be called when scripts are created or destroyed (loaded or @@ -549,11 +549,11 @@ JSD_AddFullSourceText(JSDContext* jsdc, * Implement a callback of this form in order to hook execution. */ typedef uintN -(*JSD_ExecutionHookProc)(JSDContext* jsdc, - JSDThreadState* jsdthreadstate, - uintN type, - void* callerdata, - jsval* rval); +(* JS_DLL_CALLBACK 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 */ @@ -568,10 +568,10 @@ typedef uintN * ignored to TOPLEVEL_END and FUNCTION_RETURN type hooks. */ typedef JSBool -(*JSD_CallHookProc)(JSDContext* jsdc, - JSDThreadState* jsdthreadstate, - uintN type, - void* callerdata); +(* JS_DLL_CALLBACK JSD_CallHookProc)(JSDContext* jsdc, + JSDThreadState* jsdthreadstate, + uintN type, + void* callerdata); /* * Set Hook to be called whenever the given pc is about to be executed -- @@ -825,11 +825,11 @@ JSD_SetException(JSDContext* jsdc, JSDThreadState* jsdthreadstate, * Implement a callback of this form in order to hook the ErrorReporter */ typedef uintN -(*JSD_ErrorReporter)(JSDContext* jsdc, - JSContext* cx, - const char* message, - JSErrorReport* report, - void* callerdata); +(* JS_DLL_CALLBACK JSD_ErrorReporter)(JSDContext* jsdc, + JSContext* cx, + const char* message, + JSErrorReport* report, + void* callerdata); /* Set ErrorReporter hook */ extern JSD_PUBLIC_API(JSBool)