Bug 411365. JS Shark renames per brendan. r/a=brendan
authorsayrer@gmail.com
Sat, 19 Jan 2008 15:33:08 -0800
changeset 10447 ca488bbcd2ca3ffd5ddfcdc7395e2dca38f307c4
parent 10446 ea8b90a87b0414d4e2fafa788808269369b4f43e
child 10448 3c2aded84be48b354df092fa67b215a5c71b78d7
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs411365
milestone1.9b3pre
Bug 411365. JS Shark renames per brendan. r/a=brendan
dom/src/base/nsJSEnvironment.cpp
js/src/js.c
js/src/jsdbgapi.c
js/src/jsdbgapi.h
js/src/xpconnect/shell/xpcshell.cpp
--- a/dom/src/base/nsJSEnvironment.cpp
+++ b/dom/src/base/nsJSEnvironment.cpp
@@ -3069,20 +3069,20 @@ static JSFunctionSpec JProfFunctions[] =
     {"JProfStopProfiling",         JProfStopProfilingJS,       0, 0, 0},
     {nsnull,                       nsnull,                     0, 0, 0}
 };
 
 #endif /* defined(MOZ_JPROF) */
 
 #ifdef MOZ_SHARK
 static JSFunctionSpec SharkFunctions[] = {
-    {"startShark",                 StartShark,                 0, 0, 0},
-    {"stopShark",                  StopShark,                  0, 0, 0},
-    {"connectShark",               ConnectShark,               0, 0, 0},
-    {"disconnectShark",            DisconnectShark,            0, 0, 0},
+    {"startShark",                 js_StartShark,              0, 0, 0},
+    {"stopShark",                  js_StopShark,               0, 0, 0},
+    {"connectShark",               js_ConnectShark,            0, 0, 0},
+    {"disconnectShark",            js_DisconnectShark,         0, 0, 0},
     {nsnull,                       nsnull,                     0, 0, 0}
 };
 #endif
 
 nsresult
 nsJSContext::InitClasses(void *aGlobalObj)
 {
   nsresult rv = NS_OK;
--- a/js/src/js.c
+++ b/js/src/js.c
@@ -519,17 +519,17 @@ ProcessArgs(JSContext *cx, JSObject *obj
             gMaxStackSize = atoi(argv[i]);
             break;
 
         case 'z':
             obj = split_setup(cx);
             break;
 #ifdef MOZ_SHARK
         case 'k':
-            js_ConnectShark();
+            JS_ConnectShark();
             break;
 #endif
         default:
             return usage();
         }
     }
 
     if (filename || isInteractive)
--- a/js/src/jsdbgapi.c
+++ b/js/src/jsdbgapi.c
@@ -1671,96 +1671,96 @@ JS_SetContextDebugHooks(JSContext *cx, J
     JS_ASSERT(hooks);
     old = cx->debugHooks;
     cx->debugHooks = hooks;
     return old;
 }
 
 #ifdef MOZ_SHARK
 
-JS_FRIEND_API(JSBool)
-js_StartChudRemote() 
+JS_PUBLIC_API(JSBool)
+JS_StartChudRemote() 
 {
     if (chudIsRemoteAccessAcquired() && 
         (chudStartRemotePerfMonitor("Mozilla") == chudSuccess)) {
         return JS_TRUE;
     }
 
     return JS_FALSE;
 }
 
-JS_FRIEND_API(JSBool)
-js_StopChudRemote()
+JS_PUBLIC_API(JSBool)
+JS_StopChudRemote()
 {
     if (chudIsRemoteAccessAcquired() &&
         (chudStopRemotePerfMonitor() == chudSuccess)) {
         return JS_TRUE;
     }
 
     return JS_FALSE;
 }
 
-JS_FRIEND_API(JSBool)
-js_ConnectShark()
+JS_PUBLIC_API(JSBool)
+JS_ConnectShark()
 {
     if (!chudIsInitialized() && (chudInitialize() != chudSuccess))
         return JS_FALSE;
 
     if (chudAcquireRemoteAccess() != chudSuccess)
         return JS_FALSE;
 
     return JS_TRUE;
 }
 
-JS_FRIEND_API(JSBool)
-js_DisconnectShark()
+JS_PUBLIC_API(JSBool)
+JS_DisconnectShark()
 {
     if (chudIsRemoteAccessAcquired() && (chudReleaseRemoteAccess() != chudSuccess))
         return JS_FALSE;
 
     return JS_TRUE;
 }
 
 JS_FRIEND_API(JSBool)
-StartShark(JSContext *cx, JSObject *obj,
-           uintN argc, jsval *argv, jsval *rval)
+js_StartShark(JSContext *cx, JSObject *obj,
+              uintN argc, jsval *argv, jsval *rval)
 {
-    if (!js_StartChudRemote()) {
+    if (!JS_StartChudRemote()) {
         JS_ReportError(cx, "Error starting CHUD.");
     }
 
     return JS_TRUE;
 }
 
 JS_FRIEND_API(JSBool)
-StopShark(JSContext *cx, JSObject *obj,
-          uintN argc, jsval *argv, jsval *rval)
+js_StopShark(JSContext *cx, JSObject *obj,
+             uintN argc, jsval *argv, jsval *rval)
 {
-    if (!js_StopChudRemote()) {
+    if (!JS_StopChudRemote()) {
         JS_ReportError(cx, "Error stopping CHUD.");
     }
         
     return JS_TRUE;
 }
 
 JS_FRIEND_API(JSBool)
-ConnectShark(JSContext *cx, JSObject *obj,
-             uintN argc, jsval *argv, jsval *rval)
+js_ConnectShark(JSContext *cx, JSObject *obj,
+                uintN argc, jsval *argv, jsval *rval)
 {
-    if (!js_ConnectShark()) {
+    if (!JS_ConnectShark()) {
         JS_ReportError(cx, "Error connecting to Shark.");
     }
         
     return JS_TRUE;
 }
 
 JS_FRIEND_API(JSBool)
-DisconnectShark(JSContext *cx, JSObject *obj,
-                uintN argc, jsval *argv, jsval *rval)
+js_DisconnectShark(JSContext *cx, JSObject *obj,
+                   uintN argc, jsval *argv, jsval *rval)
 {
-    if (!js_DisconnectShark()) {
+    if (!JS_DisconnectShark()) {
         JS_ReportError(cx, "Error disconnecting from Shark.");
     }
         
     return JS_TRUE;
 }
 
 #endif /* MOZ_SHARK */
--- a/js/src/jsdbgapi.h
+++ b/js/src/jsdbgapi.h
@@ -417,31 +417,31 @@ JS_NewSystemObject(JSContext *cx, JSClas
 
 extern JS_PUBLIC_API(JSDebugHooks *)
 JS_GetGlobalDebugHooks(JSRuntime *rt);
 
 extern JS_PUBLIC_API(JSDebugHooks *)
 JS_SetContextDebugHooks(JSContext *cx, JSDebugHooks *hooks);
 
 #ifdef MOZ_SHARK
-extern JS_FRIEND_API(JSBool) js_StartChudRemote();
-extern JS_FRIEND_API(JSBool) js_StopChudRemote();
-extern JS_FRIEND_API(JSBool) js_ConnectShark();
-extern JS_FRIEND_API(JSBool) js_DisconnectShark();
-
-extern JS_FRIEND_API(JSBool) StopShark(JSContext *cx, JSObject *obj,
-                                       uintN argc, jsval *argv, jsval *rval);
+extern JS_PUBLIC_API(JSBool) JS_StartChudRemote();
+extern JS_PUBLIC_API(JSBool) JS_StopChudRemote();
+extern JS_PUBLIC_API(JSBool) JS_ConnectShark();
+extern JS_PUBLIC_API(JSBool) JS_DisconnectShark();
 
-extern JS_FRIEND_API(JSBool) StartShark(JSContext *cx, JSObject *obj,
-                                        uintN argc, jsval *argv, jsval *rval);
+extern JS_FRIEND_API(JSBool) js_StopShark(JSContext *cx, JSObject *obj,
+                                          uintN argc, jsval *argv, jsval *rval);
 
-extern JS_FRIEND_API(JSBool) ConnectShark(JSContext *cx, JSObject *obj,
-                                          uintN argc, jsval *argv,
-                                          jsval *rval);
+extern JS_FRIEND_API(JSBool) js_StartShark(JSContext *cx, JSObject *obj,
+                                           uintN argc, jsval *argv, jsval *rval);
 
-extern JS_FRIEND_API(JSBool) DisconnectShark(JSContext *cx, JSObject *obj,
+extern JS_FRIEND_API(JSBool) js_ConnectShark(JSContext *cx, JSObject *obj,
                                              uintN argc, jsval *argv,
                                              jsval *rval);
+
+extern JS_FRIEND_API(JSBool) js_DisconnectShark(JSContext *cx, JSObject *obj,
+                                                uintN argc, jsval *argv,
+                                                jsval *rval);
 #endif /* MOZ_SHARK */
 
 JS_END_EXTERN_C
 
 #endif /* jsdbgapi_h___ */
--- a/js/src/xpconnect/shell/xpcshell.cpp
+++ b/js/src/xpconnect/shell/xpcshell.cpp
@@ -891,17 +891,17 @@ ProcessArgs(JSContext *cx, JSObject *obj
             break;
         }
         case 'C':
             compileOnly = JS_TRUE;
             isInteractive = JS_FALSE;
             break;
 #ifdef MOZ_SHARK
         case 'k':
-            js_ConnectShark();
+            JS_ConnectShark();
             break;
 #endif
         default:
             return usage();
         }
     }
 
     if (filename || isInteractive)