| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()), |
| 266 Utils::ToLocal(source_map_url), | 266 Utils::ToLocal(source_map_url), |
| 267 v8::Boolean::New(v8_isolate, options.IsOpaque())); | 267 v8::Boolean::New(v8_isolate, options.IsOpaque()), |
| 268 v8::Boolean::New(v8_isolate, script->type() == i::Script::TYPE_WASM)); |
| 268 return origin; | 269 return origin; |
| 269 } | 270 } |
| 270 | 271 |
| 271 | 272 |
| 272 // --- E x c e p t i o n B e h a v i o r --- | 273 // --- E x c e p t i o n B e h a v i o r --- |
| 273 | 274 |
| 274 | 275 |
| 275 void i::FatalProcessOutOfMemory(const char* location) { | 276 void i::FatalProcessOutOfMemory(const char* location) { |
| 276 i::V8::FatalProcessOutOfMemory(location, false); | 277 i::V8::FatalProcessOutOfMemory(location, false); |
| 277 } | 278 } |
| (...skipping 9574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9852 Address callback_address = | 9853 Address callback_address = |
| 9853 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9854 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 9854 VMState<EXTERNAL> state(isolate); | 9855 VMState<EXTERNAL> state(isolate); |
| 9855 ExternalCallbackScope call_scope(isolate, callback_address); | 9856 ExternalCallbackScope call_scope(isolate, callback_address); |
| 9856 callback(info); | 9857 callback(info); |
| 9857 } | 9858 } |
| 9858 | 9859 |
| 9859 | 9860 |
| 9860 } // namespace internal | 9861 } // namespace internal |
| 9861 } // namespace v8 | 9862 } // namespace v8 |
| OLD | NEW |