| Index: src/contexts.cc
|
| diff --git a/src/contexts.cc b/src/contexts.cc
|
| index 37021ac7f67f789e33bdf6f91d876fc99eb4c551..d66a33043424c6cb13fc15214e3a97c4f3f36243 100644
|
| --- a/src/contexts.cc
|
| +++ b/src/contexts.cc
|
| @@ -18,7 +18,7 @@ Handle<ScriptContextTable> ScriptContextTable::Extend(
|
| int used = table->used();
|
| int length = table->length();
|
| CHECK(used >= 0 && length > 0 && used < length);
|
| - if (used + 1 == length) {
|
| + if (used + kFirstContextSlot == length) {
|
| CHECK(length < Smi::kMaxValue / 2);
|
| Isolate* isolate = table->GetIsolate();
|
| Handle<FixedArray> copy =
|
| @@ -31,7 +31,7 @@ Handle<ScriptContextTable> ScriptContextTable::Extend(
|
| result->set_used(used + 1);
|
|
|
| DCHECK(script_context->IsScriptContext());
|
| - result->set(used + 1, *script_context);
|
| + result->set(used + kFirstContextSlot, *script_context);
|
| return result;
|
| }
|
|
|
|
|