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

Unified Diff: src/d8-console.cc

Issue 2838143002: [d8] console methods must not throw. (Closed)
Patch Set: fix for non-intl build Created 3 years, 8 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
Index: src/d8-console.cc
diff --git a/src/d8-console.cc b/src/d8-console.cc
index 9e0d244e780cc09a5dc23d611f7731702e62a543..e4f81b3c2df3fc37ce1e3adc7e9564e6175658ef 100644
--- a/src/d8-console.cc
+++ b/src/d8-console.cc
@@ -21,7 +21,7 @@ void WriteToFile(FILE* file, Isolate* isolate,
if (arg->IsSymbol()) arg = Local<Symbol>::Cast(arg)->Name();
if (!arg->ToString(isolate->GetCurrentContext()).ToLocal(&str_obj)) {
- try_catch.ReThrow();
+ Shell::ReportException(isolate, &try_catch);
return;
}
@@ -68,7 +68,7 @@ void D8Console::Time(const debug::ConsoleCallArguments& args) {
Local<String> label;
v8::TryCatch try_catch(isolate_);
if (!arg->ToString(isolate_->GetCurrentContext()).ToLocal(&label)) {
- try_catch.ReThrow();
+ Shell::ReportException(isolate_, &try_catch);
return;
}
v8::String::Utf8Value utf8(label);
@@ -94,7 +94,7 @@ void D8Console::TimeEnd(const debug::ConsoleCallArguments& args) {
Local<String> label;
v8::TryCatch try_catch(isolate_);
if (!arg->ToString(isolate_->GetCurrentContext()).ToLocal(&label)) {
- try_catch.ReThrow();
+ Shell::ReportException(isolate_, &try_catch);
return;
}
v8::String::Utf8Value utf8(label);

Powered by Google App Engine
This is Rietveld 408576698