diff options
Diffstat (limited to 'chromium/v8/src/scopeinfo.cc')
-rw-r--r-- | chromium/v8/src/scopeinfo.cc | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/chromium/v8/src/scopeinfo.cc b/chromium/v8/src/scopeinfo.cc index ba138f2adda..03e69bf3842 100644 --- a/chromium/v8/src/scopeinfo.cc +++ b/chromium/v8/src/scopeinfo.cc @@ -32,8 +32,6 @@ #include "scopeinfo.h" #include "scopes.h" -#include "allocation-inl.h" - namespace v8 { namespace internal { @@ -363,26 +361,25 @@ 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; - RETURN_IF_EMPTY_HANDLE_VALUE( + Handle<Object> result = Runtime::SetObjectProperty( isolate, - SetProperty(isolate, - scope_object, - Handle<String>(String::cast(get(i))), - Handle<Object>(context->get(context_index), isolate), - ::NONE, - kNonStrictMode), - false); + scope_object, + Handle<String>(String::cast(scope_info->get(i))), + Handle<Object>(context->get(context_index), isolate), + ::NONE, + kNonStrictMode); + RETURN_IF_EMPTY_HANDLE_VALUE(isolate, result, false); } return true; } |