Make more functions static.
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 14 Jul 2011 14:11:49 -0500
changeset 75213 b5d52a4a5331e84e7a912474435dd5dc899f74a0
parent 75212 695f93acc095cfea6895a052af44d3c7fe510ac7
child 75214 7ab52ec1b9be8c3f52c8fbad730d8880629de33a
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
milestone8.0a1
Make more functions static.
js/src/jsdbg.cpp
--- a/js/src/jsdbg.cpp
+++ b/js/src/jsdbg.cpp
@@ -2101,17 +2101,17 @@ DebuggerScript_getLineOffsets(JSContext 
                 return false;
         }
     }
 
     vp->setObject(*result);
     return true;
 }
 
-JSBool
+static JSBool
 DebuggerScript_setBreakpoint(JSContext *cx, uintN argc, Value *vp)
 {
     REQUIRE_ARGC("Debugger.Script.setBreakpoint", 2);
     THIS_DEBUGSCRIPT_LIVE_SCRIPT(cx, vp, "setBreakpoint", obj, script);
     Debugger *dbg = Debugger::fromChildJSObject(obj);
 
     JSObject *holder = GetScriptHolder(obj);
     if (!dbg->observesScope(ScriptScope(cx, script, holder))) {
@@ -2139,17 +2139,17 @@ DebuggerScript_setBreakpoint(JSContext *
 
 fail2:
     site->dec(cx);
 fail1:
     site->destroyIfEmpty(cx->runtime, NULL);
     return false;
 }
 
-JSBool
+static JSBool
 DebuggerScript_getBreakpoints(JSContext *cx, uintN argc, Value *vp)
 {
     THIS_DEBUGSCRIPT_LIVE_SCRIPT(cx, vp, "getBreakpoints", obj, script);
     Debugger *dbg = Debugger::fromChildJSObject(obj);
 
     jsbytecode *pc;
     if (argc > 0) {
         size_t offset;
@@ -2175,33 +2175,33 @@ DebuggerScript_getBreakpoints(JSContext 
                 }
             }
         }
     }
     vp->setObject(*arr);
     return true;
 }
 
-JSBool
+static JSBool
 DebuggerScript_clearBreakpoint(JSContext *cx, uintN argc, Value *vp)
 {
     REQUIRE_ARGC("Debugger.Script.clearBreakpoint", 1);
     THIS_DEBUGSCRIPT_LIVE_SCRIPT(cx, vp, "clearBreakpoint", obj, script);
     Debugger *dbg = Debugger::fromChildJSObject(obj);
 
     JSObject *handler = NonNullObject(cx, vp[2]);
     if (!handler)
         return false;
 
     script->compartment->clearBreakpointsIn(cx, dbg, script, handler);
     vp->setUndefined();
     return true;
 }
 
-JSBool
+static JSBool
 DebuggerScript_clearAllBreakpoints(JSContext *cx, uintN argc, Value *vp)
 {
     THIS_DEBUGSCRIPT_LIVE_SCRIPT(cx, vp, "clearBreakpoint", obj, script);
     Debugger *dbg = Debugger::fromChildJSObject(obj);
     script->compartment->clearBreakpointsIn(cx, dbg, script, NULL);
     vp->setUndefined();
     return true;
 }
@@ -2363,17 +2363,17 @@ DebuggerFrame_getOlder(JSContext *cx, ui
 
 Class DebuggerArguments_class = {
     "Arguments", JSCLASS_HAS_RESERVED_SLOTS(JSSLOT_DEBUGARGUMENTS_COUNT),
     PropertyStub, PropertyStub, PropertyStub, StrictPropertyStub,
     EnumerateStub, ResolveStub, ConvertStub
 };
 
 // The getter used for each element of frame.arguments. See DebuggerFrame_getArguments.
-JSBool
+static JSBool
 DebuggerArguments_getArg(JSContext *cx, uintN argc, Value *vp)
 {
     JSObject *callee = &CallArgsFromVp(argc, vp).callee();
     int32 i = callee->getReservedSlot(0).toInt32();
 
     // Check that the this value is an Arguments object.
     if (!vp[1].isObject()) {
         ReportObjectRequired(cx);
@@ -2396,17 +2396,17 @@ DebuggerArguments_getArg(JSContext *cx, 
     JS_ASSERT(i >= 0);
     if (uintN(i) < fp->numActualArgs())
         *vp = fp->actualArgs()[i];
     else
         vp->setUndefined();
     return Debugger::fromChildJSObject(thisobj)->wrapDebuggeeValue(cx, vp);
 }
 
-JSBool
+static JSBool
 DebuggerFrame_getArguments(JSContext *cx, uintN argc, Value *vp)
 {
     THIS_FRAME(cx, vp, "get arguments", thisobj, fp);
     Value argumentsv = thisobj->getReservedSlot(JSSLOT_DEBUGFRAME_ARGUMENTS);
     if (!argumentsv.isUndefined()) {
         JS_ASSERT(argumentsv.isObjectOrNull());
         *vp = argumentsv;
         return true;