| 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 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 next_(isolate_->try_catch_handler()), | 1845 next_(isolate_->try_catch_handler()), |
| 1846 is_verbose_(false), | 1846 is_verbose_(false), |
| 1847 can_continue_(true), | 1847 can_continue_(true), |
| 1848 capture_message_(true), | 1848 capture_message_(true), |
| 1849 rethrow_(false), | 1849 rethrow_(false), |
| 1850 has_terminated_(false) { | 1850 has_terminated_(false) { |
| 1851 ResetInternal(); | 1851 ResetInternal(); |
| 1852 // Special handling for simulators which have a separate JS stack. | 1852 // Special handling for simulators which have a separate JS stack. |
| 1853 js_stack_comparable_address_ = | 1853 js_stack_comparable_address_ = |
| 1854 reinterpret_cast<void*>(v8::internal::SimulatorStack::RegisterCTryCatch( | 1854 reinterpret_cast<void*>(v8::internal::SimulatorStack::RegisterCTryCatch( |
| 1855 GetCurrentStackPosition())); | 1855 v8::internal::GetCurrentStackPosition())); |
| 1856 isolate_->RegisterTryCatchHandler(this); | 1856 isolate_->RegisterTryCatchHandler(this); |
| 1857 } | 1857 } |
| 1858 | 1858 |
| 1859 | 1859 |
| 1860 v8::TryCatch::~TryCatch() { | 1860 v8::TryCatch::~TryCatch() { |
| 1861 DCHECK(isolate_ == i::Isolate::Current()); | 1861 DCHECK(isolate_ == i::Isolate::Current()); |
| 1862 if (rethrow_) { | 1862 if (rethrow_) { |
| 1863 v8::Isolate* isolate = reinterpret_cast<Isolate*>(isolate_); | 1863 v8::Isolate* isolate = reinterpret_cast<Isolate*>(isolate_); |
| 1864 v8::HandleScope scope(isolate); | 1864 v8::HandleScope scope(isolate); |
| 1865 v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(isolate, Exception()); | 1865 v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(isolate, Exception()); |
| (...skipping 5760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7627 Address callback_address = | 7627 Address callback_address = |
| 7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7629 VMState<EXTERNAL> state(isolate); | 7629 VMState<EXTERNAL> state(isolate); |
| 7630 ExternalCallbackScope call_scope(isolate, callback_address); | 7630 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7631 callback(info); | 7631 callback(info); |
| 7632 } | 7632 } |
| 7633 | 7633 |
| 7634 | 7634 |
| 7635 } } // namespace v8::internal | 7635 } } // namespace v8::internal |
| OLD | NEW |