Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: src/api.cc

Issue 967483003: Remove obsolete Isolate::DoThrow helper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix one comment. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 1866
1867 1867
1868 v8::TryCatch::~TryCatch() { 1868 v8::TryCatch::~TryCatch() {
1869 if (rethrow_) { 1869 if (rethrow_) {
1870 v8::Isolate* isolate = reinterpret_cast<Isolate*>(isolate_); 1870 v8::Isolate* isolate = reinterpret_cast<Isolate*>(isolate_);
1871 v8::HandleScope scope(isolate); 1871 v8::HandleScope scope(isolate);
1872 v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(isolate, Exception()); 1872 v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(isolate, Exception());
1873 if (HasCaught() && capture_message_) { 1873 if (HasCaught() && capture_message_) {
1874 // If an exception was caught and rethrow_ is indicated, the saved 1874 // If an exception was caught and rethrow_ is indicated, the saved
1875 // message, script, and location need to be restored to Isolate TLS 1875 // message, script, and location need to be restored to Isolate TLS
1876 // for reuse. capture_message_ needs to be disabled so that DoThrow() 1876 // for reuse. capture_message_ needs to be disabled so that Throw()
1877 // does not create a new message. 1877 // does not create a new message.
1878 isolate_->thread_local_top()->rethrowing_message_ = true; 1878 isolate_->thread_local_top()->rethrowing_message_ = true;
1879 isolate_->RestorePendingMessageFromTryCatch(this); 1879 isolate_->RestorePendingMessageFromTryCatch(this);
1880 } 1880 }
1881 isolate_->UnregisterTryCatchHandler(this); 1881 isolate_->UnregisterTryCatchHandler(this);
1882 v8::internal::SimulatorStack::UnregisterCTryCatch(); 1882 v8::internal::SimulatorStack::UnregisterCTryCatch();
1883 reinterpret_cast<Isolate*>(isolate_)->ThrowException(exc); 1883 reinterpret_cast<Isolate*>(isolate_)->ThrowException(exc);
1884 DCHECK(!isolate_->thread_local_top()->rethrowing_message_); 1884 DCHECK(!isolate_->thread_local_top()->rethrowing_message_);
1885 } else { 1885 } else {
1886 if (HasCaught() && isolate_->has_scheduled_exception()) { 1886 if (HasCaught() && isolate_->has_scheduled_exception()) {
(...skipping 5941 matching lines...) Expand 10 before | Expand all | Expand 10 after
7828 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7828 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7829 Address callback_address = 7829 Address callback_address =
7830 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7830 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7831 VMState<EXTERNAL> state(isolate); 7831 VMState<EXTERNAL> state(isolate);
7832 ExternalCallbackScope call_scope(isolate, callback_address); 7832 ExternalCallbackScope call_scope(isolate, callback_address);
7833 callback(info); 7833 callback(info);
7834 } 7834 }
7835 7835
7836 7836
7837 } } // namespace v8::internal 7837 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698