Bug 739512: Patch 4: move JS{Const,Object,TryNote}Array into the |js| namespace. r=sfink.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 10 Apr 2012 23:51:12 -0700
changeset 92783 0831ce6ba72ffdb1d020e7ecbd5468ac076950d4
parent 92782 34e6551d2bc1281112464f1a06dc0febbe15cde0
child 92784 80ece0284245dde3ea5967a105df1bfcaa989632
push id8869
push usernnethercote@mozilla.com
push dateTue, 01 May 2012 00:57:18 +0000
treeherdermozilla-inbound@0831ce6ba72f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs739512
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 739512: Patch 4: move JS{Const,Object,TryNote}Array into the |js| namespace. r=sfink.
js/src/frontend/BytecodeCompiler.cpp
js/src/frontend/BytecodeEmitter.cpp
js/src/frontend/BytecodeEmitter.h
js/src/jsdbgapi.cpp
js/src/jsopcode.cpp
js/src/jsscript.cpp
js/src/jsscript.h
js/src/jsscriptinlines.h
js/src/shell/js.cpp
js/src/vm/Debugger.cpp
js/src/vm/ScopeObject.cpp
--- a/js/src/frontend/BytecodeCompiler.cpp
+++ b/js/src/frontend/BytecodeCompiler.cpp
@@ -108,17 +108,17 @@ DefineGlobals(JSContext *cx, GlobalScope
      * Use this information to repoint each use to the correct slot in the global
      * object.
      */
     while (worklist.length()) {
         JSScript *outer = worklist.back();
         worklist.popBack();
 
         if (outer->hasObjects()) {
-            JSObjectArray *arr = outer->objects();
+            ObjectArray *arr = outer->objects();
 
             /*
              * If this is an eval script, don't treat the saved caller function
              * stored in the first object slot as an inner function.
              */
             size_t start = outer->savedCallerFun ? 1 : 0;
 
             for (size_t i = start; i < arr->length; i++) {
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -6977,17 +6977,17 @@ NewTryNote(JSContext *cx, BytecodeEmitte
     tryNode->note.length = (uint32_t)(end - start);
     tryNode->prev = bce->lastTryNode;
     bce->lastTryNode = tryNode;
     bce->ntrynotes++;
     return JS_TRUE;
 }
 
 void
-frontend::FinishTakingTryNotes(BytecodeEmitter *bce, JSTryNoteArray *array)
+frontend::FinishTakingTryNotes(BytecodeEmitter *bce, TryNoteArray *array)
 {
     TryNode *tryNode;
     JSTryNote *tn;
 
     JS_ASSERT(array->length > 0 && array->length == bce->ntrynotes);
     tn = array->vector + array->length;
     tryNode = bce->lastTryNode;
     do {
@@ -7043,33 +7043,33 @@ CGObjectList::index(ObjectBox *objbox)
 {
     JS_ASSERT(!objbox->emitLink);
     objbox->emitLink = lastbox;
     lastbox = objbox;
     return length++;
 }
 
 void
-CGObjectList::finish(JSObjectArray *array)
+CGObjectList::finish(ObjectArray *array)
 {
     JS_ASSERT(length <= INDEX_LIMIT);
     JS_ASSERT(length == array->length);
 
     js::HeapPtrObject *cursor = array->vector + array->length;
     ObjectBox *objbox = lastbox;
     do {
         --cursor;
         JS_ASSERT(!*cursor);
         *cursor = objbox->object;
     } while ((objbox = objbox->emitLink) != NULL);
     JS_ASSERT(cursor == array->vector);
 }
 
 void
-GCConstList::finish(JSConstArray *array)
+GCConstList::finish(ConstArray *array)
 {
     JS_ASSERT(array->length == list.length());
     Value *src = list.begin(), *srcend = list.end();
     HeapValue *dst = array->vector;
     for (; src != srcend; ++src, ++dst)
         *dst = *src;
 }
 
--- a/js/src/frontend/BytecodeEmitter.h
+++ b/js/src/frontend/BytecodeEmitter.h
@@ -532,26 +532,26 @@ struct TryNode {
 
 struct CGObjectList {
     uint32_t            length;     /* number of emitted so far objects */
     ObjectBox           *lastbox;   /* last emitted object */
 
     CGObjectList() : length(0), lastbox(NULL) {}
 
     unsigned index(ObjectBox *objbox);
-    void finish(JSObjectArray *array);
+    void finish(ObjectArray *array);
 };
 
 class GCConstList {
     Vector<Value> list;
   public:
     GCConstList(JSContext *cx) : list(cx) {}
     bool append(Value v) { return list.append(v); }
     size_t length() const { return list.length(); }
-    void finish(JSConstArray *array);
+    void finish(ConstArray *array);
 };
 
 struct GlobalScope {
     GlobalScope(JSContext *cx, JSObject *globalObj, BytecodeEmitter *bce)
       : globalObj(cx, globalObj), bce(bce), defs(cx), names(cx),
         defsRoot(cx, &defs), namesRoot(cx, &names)
     { }
 
@@ -999,17 +999,17 @@ NewSrcNote3(JSContext *cx, BytecodeEmitt
  */
 jssrcnote *
 AddToSrcNoteDelta(JSContext *cx, BytecodeEmitter *bce, jssrcnote *sn, ptrdiff_t delta);
 
 JSBool
 FinishTakingSrcNotes(JSContext *cx, BytecodeEmitter *bce, jssrcnote *notes);
 
 void
-FinishTakingTryNotes(BytecodeEmitter *bce, JSTryNoteArray *array);
+FinishTakingTryNotes(BytecodeEmitter *bce, TryNoteArray *array);
 
 } /* namespace frontend */
 
 /*
  * Finish taking source notes in cx's notePool, copying final notes to the new
  * stable store allocated by the caller and passed in via notes. Return false
  * on malloc failure, which means this function reported an error.
  *
--- a/js/src/jsdbgapi.cpp
+++ b/js/src/jsdbgapi.cpp
@@ -995,17 +995,17 @@ JS_GetFunctionTotalSize(JSContext *cx, J
     return nbytes;
 }
 
 JS_PUBLIC_API(size_t)
 JS_GetScriptTotalSize(JSContext *cx, JSScript *script)
 {
     size_t nbytes, pbytes;
     jssrcnote *sn, *notes;
-    JSObjectArray *objarray;
+    ObjectArray *objarray;
     JSPrincipals *principals;
 
     nbytes = sizeof *script;
     nbytes += script->length * sizeof script->code[0];
     nbytes += script->natoms * sizeof script->atoms[0];
     for (size_t i = 0; i < script->natoms; i++)
         nbytes += GetAtomTotalSize(cx, script->atoms[i]);
 
@@ -1030,20 +1030,18 @@ JS_GetScriptTotalSize(JSContext *cx, JSS
         objarray = script->regexps();
         size_t i = objarray->length;
         nbytes += sizeof *objarray + i * sizeof objarray->vector[0];
         do {
             nbytes += JS_GetObjectTotalSize(cx, objarray->vector[--i]);
         } while (i != 0);
     }
 
-    if (script->hasTrynotes()) {
-        nbytes += sizeof(JSTryNoteArray) +
-            script->trynotes()->length * sizeof(JSTryNote);
-    }
+    if (script->hasTrynotes())
+        nbytes += sizeof(TryNoteArray) + script->trynotes()->length * sizeof(JSTryNote);
 
     principals = script->principals;
     if (principals) {
         JS_ASSERT(principals->refcount);
         pbytes = sizeof *principals;
         if (principals->refcount > 1)
             pbytes = JS_HOWMANY(pbytes, principals->refcount);
         nbytes += pbytes;
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -521,17 +521,17 @@ js_Disassemble1(JSContext *cx, JSScript 
 
     switch (JOF_TYPE(cs->format)) {
       case JOF_BYTE:
           // Scan the trynotes to find the associated catch block
           // and make the try opcode look like a jump instruction
           // with an offset. This simplifies code coverage analysis
           // based on this disassembled output.
           if (op == JSOP_TRY) {
-              JSTryNoteArray *trynotes = script->trynotes();
+              TryNoteArray *trynotes = script->trynotes();
               uint32_t i;
               for(i = 0; i < trynotes->length; i++) {
                   JSTryNote note = trynotes->vector[i];
                   if (note.kind == JSTRY_CATCH && note.start == loc + 1) {
                       Sprint(sp, " %u (%+d)",
                              (unsigned int) (loc+note.length+1),
                              (int) (note.length+1));
                       break;
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -1026,20 +1026,20 @@ js::FreeScriptFilenames(JSCompartment *c
  * First are some optional array headers.  They are optional because they
  * often aren't needed, i.e. the corresponding arrays often have zero elements.
  * Each header has an offset in JSScript that indicates its location within
  * |data|; that offset is INVALID_OFFSET if the array header is not present.
  * Each header also has an accessor function in JSScript.
  *
  * Array type       Array elements  Offset            Accessor
  * ----------       --------------  ------            --------
- * JSConstArray     Consts          constsOffset      consts()
- * JSObjectArray    Objects         objectsOffset     objects()
- * JSObjectArray    Regexps         regexpsOffset     regexps()
- * JSTryNoteArray   Try notes       tryNotesOffset    trynotes()
+ * ConstArray       Consts          constsOffset      consts()
+ * ObjectArray      Objects         objectsOffset     objects()
+ * ObjectArray      Regexps         regexpsOffset     regexps()
+ * TryNoteArray     Try notes       tryNotesOffset    trynotes()
  * GlobalSlotArray  Globals         globalsOffset     globals()
  * ClosedSlotArray  ClosedArgs      closedArgsOffset  closedArgs()
  * ClosedSlotArray  ClosedVars      closedVarsOffset  closedVars()
  *
  * Then are the elements of several arrays.  
  * - Most of these arrays have headers listed above (if present).  For each of
  *   these, the array pointer and the array length is stored in the header.  
  * - The remaining arrays have pointers and lengths that are stored directly in
@@ -1082,19 +1082,19 @@ js::FreeScriptFilenames(JSCompartment *c
     (JS_ALIGNMENT_OF(T1) % JS_ALIGNMENT_OF(T2) == 0)
 
 /*
  * These assertions ensure that there is no padding between the array headers,
  * and also that the consts() elements (which follow immediately afterward) are
  * jsval-aligned.  (There is an assumption that |data| itself is jsval-aligned;
  * we check this below).
  */
-JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(JSConstArray));
-JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(JSObjectArray));     /* there are two of these */
-JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(JSTryNoteArray));
+JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(ConstArray));
+JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(ObjectArray));       /* there are two of these */
+JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(TryNoteArray));
 JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(GlobalSlotArray));
 JS_STATIC_ASSERT(KEEPS_JSVAL_ALIGNMENT(ClosedSlotArray));   /* there are two of these */
 
 /* These assertions ensure there is no padding required between array elements. */
 JS_STATIC_ASSERT(HAS_JSVAL_ALIGNMENT(HeapValue));
 JS_STATIC_ASSERT(NO_PADDING_BETWEEN_ENTRIES(HeapValue, JSAtom *));
 JS_STATIC_ASSERT(NO_PADDING_BETWEEN_ENTRIES(JSAtom *, HeapPtrObject));
 JS_STATIC_ASSERT(NO_PADDING_BETWEEN_ENTRIES(HeapPtrObject, HeapPtrObject));
@@ -1106,42 +1106,42 @@ JS_STATIC_ASSERT(NO_PADDING_BETWEEN_ENTR
 JS_STATIC_ASSERT(NO_PADDING_BETWEEN_ENTRIES(jsbytecode, jssrcnote));
 
 /*
  * Check that uint8_t offsets is enough to reach any optional array allocated
  * within |data|. For that we check that the maximum possible offset for the
  * closedVars array -- the last optional array -- still fits in 1 byte and does
  * not coincide with INVALID_OFFSET.
  */
-JS_STATIC_ASSERT(sizeof(JSConstArray) +
-                 sizeof(JSObjectArray) +
-                 sizeof(JSObjectArray) +
-                 sizeof(JSTryNoteArray) +
-                 sizeof(js::GlobalSlotArray) +
-                 sizeof(js::ClosedSlotArray)
+JS_STATIC_ASSERT(sizeof(ConstArray) +
+                 sizeof(ObjectArray) +
+                 sizeof(ObjectArray) +
+                 sizeof(TryNoteArray) +
+                 sizeof(GlobalSlotArray) +
+                 sizeof(ClosedSlotArray)
                  < JSScript::INVALID_OFFSET);
 JS_STATIC_ASSERT(JSScript::INVALID_OFFSET <= 255);
 
 JSScript *
 JSScript::NewScript(JSContext *cx, uint32_t length, uint32_t nsrcnotes, uint32_t natoms,
                     uint32_t nobjects, uint32_t nregexps,
                     uint32_t ntrynotes, uint32_t nconsts, uint32_t nglobals,
                     uint16_t nClosedArgs, uint16_t nClosedVars, uint32_t nTypeSets, JSVersion version)
 {
     size_t size = 0;
 
     if (nconsts != 0)
-        size += sizeof(JSConstArray) + nconsts * sizeof(Value);
+        size += sizeof(ConstArray) + nconsts * sizeof(Value);
     size += sizeof(JSAtom *) * natoms;
     if (nobjects != 0)
-        size += sizeof(JSObjectArray) + nobjects * sizeof(JSObject *);
+        size += sizeof(ObjectArray) + nobjects * sizeof(JSObject *);
     if (nregexps != 0)
-        size += sizeof(JSObjectArray) + nregexps * sizeof(JSObject *);
+        size += sizeof(ObjectArray) + nregexps * sizeof(JSObject *);
     if (ntrynotes != 0)
-        size += sizeof(JSTryNoteArray) + ntrynotes * sizeof(JSTryNote);
+        size += sizeof(TryNoteArray) + ntrynotes * sizeof(JSTryNote);
     if (nglobals != 0)
         size += sizeof(GlobalSlotArray) + nglobals * sizeof(GlobalSlotArray::Entry);
     if (nClosedArgs != 0)
         size += sizeof(ClosedSlotArray) + nClosedArgs * sizeof(uint32_t);
     if (nClosedVars != 0)
         size += sizeof(ClosedSlotArray) + nClosedVars * sizeof(uint32_t);
 
     size += length * sizeof(jsbytecode);
@@ -1166,35 +1166,35 @@ JSScript::NewScript(JSContext *cx, uint3
     script->data  = data;
     script->length = length;
     script->version = version;
     new (&script->bindings) Bindings(cx);
 
     uint8_t *cursor = data;
     if (nconsts != 0) {
         script->constsOffset = uint8_t(cursor - data);
-        cursor += sizeof(JSConstArray);
+        cursor += sizeof(ConstArray);
     } else {
         script->constsOffset = JSScript::INVALID_OFFSET;
     }
     if (nobjects != 0) {
         script->objectsOffset = uint8_t(cursor - data);
-        cursor += sizeof(JSObjectArray);
+        cursor += sizeof(ObjectArray);
     } else {
         script->objectsOffset = JSScript::INVALID_OFFSET;
     }
     if (nregexps != 0) {
         script->regexpsOffset = uint8_t(cursor - data);
-        cursor += sizeof(JSObjectArray);
+        cursor += sizeof(ObjectArray);
     } else {
         script->regexpsOffset = JSScript::INVALID_OFFSET;
     }
     if (ntrynotes != 0) {
         script->trynotesOffset = uint8_t(cursor - data);
-        cursor += sizeof(JSTryNoteArray);
+        cursor += sizeof(TryNoteArray);
     } else {
         script->trynotesOffset = JSScript::INVALID_OFFSET;
     }
     if (nglobals != 0) {
         script->globalsOffset = uint8_t(cursor - data);
         cursor += sizeof(GlobalSlotArray);
     } else {
         script->globalsOffset = JSScript::INVALID_OFFSET;
@@ -1989,27 +1989,27 @@ JSScript::markChildren(JSTracer *trc)
     JS_ASSERT_IF(trc->runtime->gcStrictCompartmentChecking, compartment()->isCollecting());
 
     for (uint32_t i = 0; i < natoms; ++i) {
         if (atoms[i])
             MarkString(trc, &atoms[i], "atom");
     }
 
     if (hasObjects()) {
-        JSObjectArray *objarray = objects();
+        ObjectArray *objarray = objects();
         MarkObjectRange(trc, objarray->length, objarray->vector, "objects");
     }
 
     if (hasRegexps()) {
-        JSObjectArray *objarray = regexps();
+        ObjectArray *objarray = regexps();
         MarkObjectRange(trc, objarray->length, objarray->vector, "objects");
     }
 
     if (hasConsts()) {
-        JSConstArray *constarray = consts();
+        ConstArray *constarray = consts();
         MarkValueRange(trc, constarray->length, constarray->vector, "consts");
     }
 
     if (function())
         MarkObject(trc, &function_, "function");
 
     if (!isCachedEval && globalObject)
         MarkObject(trc, &globalObject, "object");
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -70,32 +70,32 @@ struct JSTryNote {
     uint8_t         kind;       /* one of JSTryNoteKind */
     uint8_t         padding;    /* explicit padding on uint16_t boundary */
     uint16_t        stackDepth; /* stack depth upon exception handler entry */
     uint32_t        start;      /* start of the try statement or for-in loop
                                    relative to script->main */
     uint32_t        length;     /* length of the try statement or for-in loop */
 };
 
-typedef struct JSTryNoteArray {
-    JSTryNote       *vector;    /* array of indexed try notes */
-    uint32_t        length;     /* count of indexed try notes */
-} JSTryNoteArray;
+namespace js {
 
-typedef struct JSObjectArray {
+struct ConstArray {
+    js::HeapValue   *vector;    /* array of indexed constant values */
+    uint32_t        length;
+};
+
+struct ObjectArray {
     js::HeapPtrObject *vector;  /* array of indexed objects */
     uint32_t        length;     /* count of indexed objects */
-} JSObjectArray;
+};
 
-typedef struct JSConstArray {
-    js::HeapValue   *vector;    /* array of indexed constant values */
-    uint32_t        length;
-} JSConstArray;
-
-namespace js {
+struct TryNoteArray {
+    JSTryNote       *vector;    /* array of indexed try notes */
+    uint32_t        length;     /* count of indexed try notes */
+};
 
 struct GlobalSlotArray {
     struct Entry {
         uint32_t    atomIndex;  /* index into atom table */
         uint32_t    slot;       /* global obj slot number */
     };
     Entry           *vector;
     uint32_t        length;
@@ -268,17 +268,17 @@ class Bindings
             : root(cx, (Shape **) &bindings->lastBinding)
         {}
     };
 };
 
 } /* namespace js */
 
 #define JS_OBJECT_ARRAY_SIZE(length)                                          \
-    (offsetof(JSObjectArray, vector) + sizeof(JSObject *) * (length))
+    (offsetof(ObjectArray, vector) + sizeof(JSObject *) * (length))
 
 #ifdef JS_METHODJIT
 namespace JSC {
     class ExecutablePool;
 }
 
 namespace js {
 namespace mjit {
@@ -739,34 +739,34 @@ struct JSScript : public js::gc::Cell
     bool hasConsts()        { return isValidOffset(constsOffset);     }
     bool hasObjects()       { return isValidOffset(objectsOffset);    }
     bool hasRegexps()       { return isValidOffset(regexpsOffset);    }
     bool hasTrynotes()      { return isValidOffset(trynotesOffset);   }
     bool hasGlobals()       { return isValidOffset(globalsOffset);    }
     bool hasClosedArgs()    { return isValidOffset(closedArgsOffset); }
     bool hasClosedVars()    { return isValidOffset(closedVarsOffset); }
 
-    JSConstArray *consts() {
+    js::ConstArray *consts() {
         JS_ASSERT(hasConsts());
-        return reinterpret_cast<JSConstArray *>(data + constsOffset);
+        return reinterpret_cast<js::ConstArray *>(data + constsOffset);
     }
 
-    JSObjectArray *objects() {
+    js::ObjectArray *objects() {
         JS_ASSERT(hasObjects());
-        return reinterpret_cast<JSObjectArray *>(data + objectsOffset);
+        return reinterpret_cast<js::ObjectArray *>(data + objectsOffset);
     }
 
-    JSObjectArray *regexps() {
+    js::ObjectArray *regexps() {
         JS_ASSERT(hasRegexps());
-        return reinterpret_cast<JSObjectArray *>(data + regexpsOffset);
+        return reinterpret_cast<js::ObjectArray *>(data + regexpsOffset);
     }
 
-    JSTryNoteArray *trynotes() {
+    js::TryNoteArray *trynotes() {
         JS_ASSERT(hasTrynotes());
-        return reinterpret_cast<JSTryNoteArray *>(data + trynotesOffset);
+        return reinterpret_cast<js::TryNoteArray *>(data + trynotesOffset);
     }
 
     js::GlobalSlotArray *globals() {
         JS_ASSERT(hasGlobals());
         return reinterpret_cast<js::GlobalSlotArray *>(data + globalsOffset);
     }
 
     js::ClosedSlotArray *closedArgs() {
@@ -792,32 +792,32 @@ struct JSScript : public js::gc::Cell
         return atoms[index];
     }
 
     js::PropertyName *getName(size_t index) {
         return getAtom(index)->asPropertyName();
     }
 
     JSObject *getObject(size_t index) {
-        JSObjectArray *arr = objects();
+        js::ObjectArray *arr = objects();
         JS_ASSERT(index < arr->length);
         return arr->vector[index];
     }
 
     JSVersion getVersion() const {
         return JSVersion(version);
     }
 
     inline JSFunction *getFunction(size_t index);
     inline JSFunction *getCallerFunction();
 
     inline JSObject *getRegExp(size_t index);
 
     const js::Value &getConst(size_t index) {
-        JSConstArray *arr = consts();
+        js::ConstArray *arr = consts();
         JS_ASSERT(index < arr->length);
         return arr->vector[index];
     }
 
     /*
      * The isEmpty method tells whether this script has code that computes any
      * result (not return value, result AKA normal completion value) other than
      * JSVAL_VOID, or any other effects.
--- a/js/src/jsscriptinlines.h
+++ b/js/src/jsscriptinlines.h
@@ -165,17 +165,17 @@ JSScript::getCallerFunction()
 {
     JS_ASSERT(savedCallerFun);
     return getFunction(0);
 }
 
 inline JSObject *
 JSScript::getRegExp(size_t index)
 {
-    JSObjectArray *arr = regexps();
+    js::ObjectArray *arr = regexps();
     JS_ASSERT(uint32_t(index) < arr->length);
     JSObject *obj = arr->vector[index];
     JS_ASSERT(obj->isRegExp());
     return obj;
 }
 
 inline bool
 JSScript::isEmpty() const
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -1701,17 +1701,17 @@ DisassembleScript(JSContext *cx, JSScrip
     Root<JSScript*> scriptRoot(cx, &script);
 
     if (!js_Disassemble(cx, script, lines, sp))
         return false;
     SrcNotes(cx, script, sp);
     TryNotes(cx, script, sp);
 
     if (recursive && script->hasObjects()) {
-        JSObjectArray *objects = script->objects();
+        ObjectArray *objects = script->objects();
         for (unsigned i = 0; i != objects->length; ++i) {
             JSObject *obj = objects->vector[i];
             if (obj->isFunction()) {
                 Sprint(sp, "\n");
                 JSFunction *fun = obj->toFunction();
                 JSScript *nested = fun->maybeScript();
                 if (!DisassembleScript(cx, nested, fun, lines, recursive, sp))
                     return false;
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -2532,17 +2532,17 @@ DebuggerScript_getChildScripts(JSContext
     if (!result)
         return false;
     if (script->hasObjects()) {
         /*
          * script->savedCallerFun indicates that this is a direct eval script
          * and the calling function is stored as script->objects()->vector[0].
          * It is not really a child script of this script, so skip it.
          */
-        JSObjectArray *objects = script->objects();
+        ObjectArray *objects = script->objects();
         for (uint32_t i = script->savedCallerFun ? 1 : 0; i < objects->length; i++) {
             JSObject *obj = objects->vector[i];
             if (obj->isFunction()) {
                 JSFunction *fun = static_cast<JSFunction *>(obj);
                 JSObject *s = dbg->wrapScript(cx, RootedVar<JSScript*>(cx, fun->script()));
                 if (!s || !js_NewbornArrayPush(cx, result, ObjectValue(*s)))
                     return false;
             }
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -873,17 +873,17 @@ Class js::BlockClass = {
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub
 };
 
 #define NO_PARENT_INDEX UINT32_MAX
 
 static uint32_t
-FindObjectIndex(JSObjectArray *array, JSObject *obj)
+FindObjectIndex(ObjectArray *array, JSObject *obj)
 {
     size_t i;
 
     if (array) {
         i = array->length;
         do {
 
             if (array->vector[--i] == obj)