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

Side by Side Diff: src/api.cc

Issue 2314483002: Store the ScopeInfo in WithContexts (Closed)
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') | no next file with comments »
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 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 RETURN_ON_FAILED_EXECUTION(Function); 2077 RETURN_ON_FAILED_EXECUTION(Function);
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(closure, context, extension); 2087 context = factory->NewWithContext(
2088 closure, context, i::ScopeInfo::CreateForWithScope(isolate), extension);
2088 } 2089 }
2089 2090
2090 i::Handle<i::Object> name_obj; 2091 i::Handle<i::Object> name_obj;
2091 int eval_scope_position = 0; 2092 int eval_scope_position = 0;
2092 int eval_position = i::kNoSourcePosition; 2093 int eval_position = i::kNoSourcePosition;
2093 int line_offset = 0; 2094 int line_offset = 0;
2094 int column_offset = 0; 2095 int column_offset = 0;
2095 if (!source->resource_name.IsEmpty()) { 2096 if (!source->resource_name.IsEmpty()) {
2096 name_obj = Utils::OpenHandle(*(source->resource_name)); 2097 name_obj = Utils::OpenHandle(*(source->resource_name));
2097 } 2098 }
(...skipping 7111 matching lines...) Expand 10 before | Expand all | Expand 10 after
9209 Address callback_address = 9210 Address callback_address =
9210 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9211 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9211 VMState<EXTERNAL> state(isolate); 9212 VMState<EXTERNAL> state(isolate);
9212 ExternalCallbackScope call_scope(isolate, callback_address); 9213 ExternalCallbackScope call_scope(isolate, callback_address);
9213 callback(info); 9214 callback(info);
9214 } 9215 }
9215 9216
9216 9217
9217 } // namespace internal 9218 } // namespace internal
9218 } // namespace v8 9219 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698