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

Unified Diff: src/api.cc

Issue 24538002: add isolate parameter to ThrowException (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« include/v8.h ('K') | « samples/shell.cc ('k') | src/d8-posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 6eb37893bf2d3bbfd3109cd6f4783dd2e52b6988..5b73bca599b5c6f2cb7e75228a419a2afb7ba6ef 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -472,8 +472,9 @@ void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) {
}
-v8::Handle<Value> ThrowException(v8::Handle<v8::Value> value) {
- i::Isolate* isolate = i::Isolate::Current();
+v8::Local<Value> ThrowException(v8::Isolate* v8_isolate,
+ v8::Local<v8::Value> value) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
ENTER_V8(isolate);
// If we're passed an empty handle, we throw an undefined exception
// to deal more gracefully with out of memory situations.
@@ -486,6 +487,11 @@ v8::Handle<Value> ThrowException(v8::Handle<v8::Value> value) {
}
+v8::Handle<Value> ThrowException(v8::Handle<v8::Value> value) {
+ return ThrowException(v8::Isolate::GetCurrent(), value);
+}
+
+
RegisteredExtension* RegisteredExtension::first_extension_ = NULL;
@@ -1926,7 +1932,7 @@ v8::TryCatch::~TryCatch() {
isolate_->RestorePendingMessageFromTryCatch(this);
}
isolate_->UnregisterTryCatchHandler(this);
- v8::ThrowException(exc);
+ v8::ThrowException(reinterpret_cast<Isolate*>(isolate_), exc);
ASSERT(!isolate_->thread_local_top()->rethrowing_message_);
} else {
isolate_->UnregisterTryCatchHandler(this);
« include/v8.h ('K') | « samples/shell.cc ('k') | src/d8-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698