OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |