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 9447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9458 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 9458 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
9459 PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, UnboundScript); | 9459 PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, UnboundScript); |
9460 i::ScriptData* script_data = NULL; | 9460 i::ScriptData* script_data = NULL; |
9461 i::Handle<i::String> str = Utils::OpenHandle(*source); | 9461 i::Handle<i::String> str = Utils::OpenHandle(*source); |
9462 i::Handle<i::SharedFunctionInfo> result; | 9462 i::Handle<i::SharedFunctionInfo> result; |
9463 { | 9463 { |
9464 ScriptOriginOptions origin_options; | 9464 ScriptOriginOptions origin_options; |
9465 result = i::Compiler::GetSharedFunctionInfoForScript( | 9465 result = i::Compiler::GetSharedFunctionInfoForScript( |
9466 str, i::Handle<i::Object>(), 0, 0, origin_options, | 9466 str, i::Handle<i::Object>(), 0, 0, origin_options, |
9467 i::Handle<i::Object>(), isolate->native_context(), NULL, &script_data, | 9467 i::Handle<i::Object>(), isolate->native_context(), NULL, &script_data, |
9468 ScriptCompiler::kNoCompileOptions, i::INSPECTOR_CODE); | 9468 ScriptCompiler::kNoCompileOptions, |
| 9469 i::FLAG_expose_inspector_scripts ? i::NOT_NATIVES_CODE |
| 9470 : i::INSPECTOR_CODE); |
9469 has_pending_exception = result.is_null(); | 9471 has_pending_exception = result.is_null(); |
9470 RETURN_ON_FAILED_EXECUTION(UnboundScript); | 9472 RETURN_ON_FAILED_EXECUTION(UnboundScript); |
9471 } | 9473 } |
9472 RETURN_ESCAPED(ToApiHandle<UnboundScript>(result)); | 9474 RETURN_ESCAPED(ToApiHandle<UnboundScript>(result)); |
9473 } | 9475 } |
9474 | 9476 |
9475 void debug::SetDebugDelegate(Isolate* v8_isolate, | 9477 void debug::SetDebugDelegate(Isolate* v8_isolate, |
9476 debug::DebugDelegate* delegate) { | 9478 debug::DebugDelegate* delegate) { |
9477 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 9479 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
9478 ENTER_V8(isolate); | 9480 ENTER_V8(isolate); |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10290 Address callback_address = | 10292 Address callback_address = |
10291 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10293 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10292 VMState<EXTERNAL> state(isolate); | 10294 VMState<EXTERNAL> state(isolate); |
10293 ExternalCallbackScope call_scope(isolate, callback_address); | 10295 ExternalCallbackScope call_scope(isolate, callback_address); |
10294 callback(info); | 10296 callback(info); |
10295 } | 10297 } |
10296 | 10298 |
10297 | 10299 |
10298 } // namespace internal | 10300 } // namespace internal |
10299 } // namespace v8 | 10301 } // namespace v8 |
OLD | NEW |