| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 Local<Context> context_; | 245 Local<Context> context_; |
| 246 bool escaped_; | 246 bool escaped_; |
| 247 bool do_callback_; | 247 bool do_callback_; |
| 248 }; | 248 }; |
| 249 | 249 |
| 250 } // namespace | 250 } // namespace |
| 251 | 251 |
| 252 | 252 |
| 253 static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, | 253 static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, |
| 254 i::Handle<i::Script> script) { | 254 i::Handle<i::Script> script) { |
| 255 i::Handle<i::Object> scriptName(i::Script::GetNameOrSourceURL(script)); | 255 i::Handle<i::Object> scriptName(script->GetNameOrSourceURL(), isolate); |
| 256 i::Handle<i::Object> source_map_url(script->source_mapping_url(), isolate); | 256 i::Handle<i::Object> source_map_url(script->source_mapping_url(), isolate); |
| 257 v8::Isolate* v8_isolate = | 257 v8::Isolate* v8_isolate = |
| 258 reinterpret_cast<v8::Isolate*>(script->GetIsolate()); | 258 reinterpret_cast<v8::Isolate*>(script->GetIsolate()); |
| 259 ScriptOriginOptions options(script->origin_options()); | 259 ScriptOriginOptions options(script->origin_options()); |
| 260 v8::ScriptOrigin origin( | 260 v8::ScriptOrigin origin( |
| 261 Utils::ToLocal(scriptName), | 261 Utils::ToLocal(scriptName), |
| 262 v8::Integer::New(v8_isolate, script->line_offset()), | 262 v8::Integer::New(v8_isolate, script->line_offset()), |
| 263 v8::Integer::New(v8_isolate, script->column_offset()), | 263 v8::Integer::New(v8_isolate, script->column_offset()), |
| 264 v8::Boolean::New(v8_isolate, options.IsSharedCrossOrigin()), | 264 v8::Boolean::New(v8_isolate, options.IsSharedCrossOrigin()), |
| 265 v8::Integer::New(v8_isolate, script->id()), | 265 v8::Integer::New(v8_isolate, script->id()), |
| (...skipping 9612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9878 Address callback_address = | 9878 Address callback_address = |
| 9879 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9879 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 9880 VMState<EXTERNAL> state(isolate); | 9880 VMState<EXTERNAL> state(isolate); |
| 9881 ExternalCallbackScope call_scope(isolate, callback_address); | 9881 ExternalCallbackScope call_scope(isolate, callback_address); |
| 9882 callback(info); | 9882 callback(info); |
| 9883 } | 9883 } |
| 9884 | 9884 |
| 9885 | 9885 |
| 9886 } // namespace internal | 9886 } // namespace internal |
| 9887 } // namespace v8 | 9887 } // namespace v8 |
| OLD | NEW |