Index: src/scopeinfo.cc |
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc |
index ba138f2addaa5a8cd3e54e4c684c2718a0e50c49..f1ae876ca3081f02ae4b397e22027106c9d589f6 100644 |
--- a/src/scopeinfo.cc |
+++ b/src/scopeinfo.cc |
@@ -363,14 +363,14 @@ int ScopeInfo::FunctionContextSlotIndex(String* name, VariableMode* mode) { |
} |
-bool ScopeInfo::CopyContextLocalsToScopeObject( |
- Isolate* isolate, |
- Handle<Context> context, |
- Handle<JSObject> scope_object) { |
- int local_count = ContextLocalCount(); |
+bool ScopeInfo::CopyContextLocalsToScopeObject(Handle<ScopeInfo> scope_info, |
+ Handle<Context> context, |
+ Handle<JSObject> scope_object) { |
+ Isolate* isolate = scope_info->GetIsolate(); |
+ int local_count = scope_info->ContextLocalCount(); |
if (local_count == 0) return true; |
// Fill all context locals to the context extension. |
- int start = ContextLocalNameEntriesIndex(); |
+ int start = scope_info->ContextLocalNameEntriesIndex(); |
int end = start + local_count; |
for (int i = start; i < end; ++i) { |
int context_index = Context::MIN_CONTEXT_SLOTS + i - start; |
@@ -378,7 +378,7 @@ bool ScopeInfo::CopyContextLocalsToScopeObject( |
isolate, |
SetProperty(isolate, |
scope_object, |
- Handle<String>(String::cast(get(i))), |
+ Handle<String>(String::cast(scope_info->get(i))), |
Handle<Object>(context->get(context_index), isolate), |
::NONE, |
kNonStrictMode), |