Bug 717278 - Vector should have const and non-const begin(). r=luke.

This commit is contained in:
Jason Orendorff 2012-01-20 06:11:42 -06:00
parent c11aff8962
commit d7665153f1
3 changed files with 9 additions and 4 deletions

View File

@ -349,7 +349,12 @@ class Vector : private AllocPolicy
return mCapacity;
}
T *begin() const {
T *begin() {
JS_ASSERT(!entered);
return mBegin;
}
const T *begin() const {
JS_ASSERT(!entered);
return mBegin;
}

View File

@ -1126,7 +1126,7 @@ class GetPropCompiler : public PICStubCompiler
}
void generateGetterStub(Assembler &masm, const Shape *shape,
Label start, const Vector<Jump, 8> &shapeMismatches)
Label start, Vector<Jump, 8> &shapeMismatches)
{
/*
* Getter hook needs to be called from the stub. The state is fully
@ -1304,7 +1304,7 @@ class GetPropCompiler : public PICStubCompiler
return Lookup_Cacheable;
}
void linkerEpilogue(LinkerHelper &buffer, Label start, const Vector<Jump, 8> &shapeMismatches)
void linkerEpilogue(LinkerHelper &buffer, Label start, Vector<Jump, 8> &shapeMismatches)
{
// The guard exit jumps to the original slow case.
for (Jump *pj = shapeMismatches.begin(); pj != shapeMismatches.end(); ++pj)

View File

@ -1166,7 +1166,7 @@ Debugger::markAllIteratively(GCMarker *trc)
*/
const GlobalObject::DebuggerVector *debuggers = global->getDebuggers();
JS_ASSERT(debuggers);
for (Debugger **p = debuggers->begin(); p != debuggers->end(); p++) {
for (Debugger * const *p = debuggers->begin(); p != debuggers->end(); p++) {
Debugger *dbg = *p;
/*