Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: src/api.cc

Issue 2271993002: Chain ScopeInfos together (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ast/scopeinfo.cc » ('j') | src/ast/scopes.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 2078
2079 i::Handle<i::Context> context = Utils::OpenHandle(*v8_context); 2079 i::Handle<i::Context> context = Utils::OpenHandle(*v8_context);
2080 i::Handle<i::SharedFunctionInfo> outer_info(context->closure()->shared(), 2080 i::Handle<i::SharedFunctionInfo> outer_info(context->closure()->shared(),
2081 isolate); 2081 isolate);
2082 for (size_t i = 0; i < context_extension_count; ++i) { 2082 for (size_t i = 0; i < context_extension_count; ++i) {
2083 i::Handle<i::JSReceiver> extension = 2083 i::Handle<i::JSReceiver> extension =
2084 Utils::OpenHandle(*context_extensions[i]); 2084 Utils::OpenHandle(*context_extensions[i]);
2085 if (!extension->IsJSObject()) return Local<Function>(); 2085 if (!extension->IsJSObject()) return Local<Function>();
2086 i::Handle<i::JSFunction> closure(context->closure(), isolate); 2086 i::Handle<i::JSFunction> closure(context->closure(), isolate);
2087 context = factory->NewWithContext( 2087 context = factory->NewWithContext(
2088 closure, context, i::ScopeInfo::CreateForWithScope(isolate), extension); 2088 closure, context,
2089 i::ScopeInfo::CreateForWithScope(
2090 isolate, context->IsNativeContext()
2091 ? i::Handle<i::ScopeInfo>::null()
2092 : i::Handle<i::ScopeInfo>(context->scope_info())),
2093 extension);
2089 } 2094 }
2090 2095
2091 i::Handle<i::Object> name_obj; 2096 i::Handle<i::Object> name_obj;
2092 int eval_scope_position = 0; 2097 int eval_scope_position = 0;
2093 int eval_position = i::kNoSourcePosition; 2098 int eval_position = i::kNoSourcePosition;
2094 int line_offset = 0; 2099 int line_offset = 0;
2095 int column_offset = 0; 2100 int column_offset = 0;
2096 if (!source->resource_name.IsEmpty()) { 2101 if (!source->resource_name.IsEmpty()) {
2097 name_obj = Utils::OpenHandle(*(source->resource_name)); 2102 name_obj = Utils::OpenHandle(*(source->resource_name));
2098 } 2103 }
(...skipping 7111 matching lines...) Expand 10 before | Expand all | Expand 10 after
9210 Address callback_address = 9215 Address callback_address =
9211 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9216 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9212 VMState<EXTERNAL> state(isolate); 9217 VMState<EXTERNAL> state(isolate);
9213 ExternalCallbackScope call_scope(isolate, callback_address); 9218 ExternalCallbackScope call_scope(isolate, callback_address);
9214 callback(info); 9219 callback(info);
9215 } 9220 }
9216 9221
9217 9222
9218 } // namespace internal 9223 } // namespace internal
9219 } // namespace v8 9224 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopeinfo.cc » ('j') | src/ast/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698