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 5527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5538 | 5538 |
5539 | 5539 |
5540 void Context::DetachGlobal() { | 5540 void Context::DetachGlobal() { |
5541 i::Handle<i::Context> context = Utils::OpenHandle(this); | 5541 i::Handle<i::Context> context = Utils::OpenHandle(this); |
5542 i::Isolate* isolate = context->GetIsolate(); | 5542 i::Isolate* isolate = context->GetIsolate(); |
5543 ENTER_V8(isolate); | 5543 ENTER_V8(isolate); |
5544 isolate->bootstrapper()->DetachGlobal(context); | 5544 isolate->bootstrapper()->DetachGlobal(context); |
5545 } | 5545 } |
5546 | 5546 |
5547 | 5547 |
5548 Local<v8::Object> Context::GetExtrasExportsObject() { | 5548 Local<v8::Object> Context::GetExtrasBindingObject() { |
5549 i::Handle<i::Context> context = Utils::OpenHandle(this); | 5549 i::Handle<i::Context> context = Utils::OpenHandle(this); |
5550 i::Isolate* isolate = context->GetIsolate(); | 5550 i::Isolate* isolate = context->GetIsolate(); |
5551 i::Handle<i::JSObject> exports(context->extras_exports_object(), isolate); | 5551 i::Handle<i::JSObject> binding(context->extras_binding_object(), isolate); |
5552 return Utils::ToLocal(exports); | 5552 return Utils::ToLocal(binding); |
5553 } | 5553 } |
5554 | 5554 |
5555 | 5555 |
5556 void Context::AllowCodeGenerationFromStrings(bool allow) { | 5556 void Context::AllowCodeGenerationFromStrings(bool allow) { |
5557 i::Handle<i::Context> context = Utils::OpenHandle(this); | 5557 i::Handle<i::Context> context = Utils::OpenHandle(this); |
5558 i::Isolate* isolate = context->GetIsolate(); | 5558 i::Isolate* isolate = context->GetIsolate(); |
5559 ENTER_V8(isolate); | 5559 ENTER_V8(isolate); |
5560 context->set_allow_code_gen_from_strings( | 5560 context->set_allow_code_gen_from_strings( |
5561 allow ? isolate->heap()->true_value() : isolate->heap()->false_value()); | 5561 allow ? isolate->heap()->true_value() : isolate->heap()->false_value()); |
5562 } | 5562 } |
(...skipping 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8416 Address callback_address = | 8416 Address callback_address = |
8417 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8417 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8418 VMState<EXTERNAL> state(isolate); | 8418 VMState<EXTERNAL> state(isolate); |
8419 ExternalCallbackScope call_scope(isolate, callback_address); | 8419 ExternalCallbackScope call_scope(isolate, callback_address); |
8420 callback(info); | 8420 callback(info); |
8421 } | 8421 } |
8422 | 8422 |
8423 | 8423 |
8424 } // namespace internal | 8424 } // namespace internal |
8425 } // namespace v8 | 8425 } // namespace v8 |
OLD | NEW |