diff --git a/src/builtins/builtins-console.cc b/src/builtins/builtins-console.cc index a43fe136d0..a021c8a75b 100644 --- a/src/builtins/builtins-console.cc +++ b/src/builtins/builtins-console.cc @@ -45,8 +45,6 @@ namespace internal { if (isolate->console_delegate()) { \ debug::ConsoleCallArguments wrapper(args); \ isolate->console_delegate()->name(wrapper); \ - CHECK(!isolate->has_pending_exception()); \ - CHECK(!isolate->has_scheduled_exception()); \ } \ return isolate->heap()->undefined_value(); \ } diff --git a/src/d8-console.cc b/src/d8-console.cc index e4f81b3c2d..9e0d244e78 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::Cast(arg)->Name(); if (!arg->ToString(isolate->GetCurrentContext()).ToLocal(&str_obj)) { - Shell::ReportException(isolate, &try_catch); + try_catch.ReThrow(); return; } @@ -68,7 +68,7 @@ void D8Console::Time(const debug::ConsoleCallArguments& args) { Local label; v8::TryCatch try_catch(isolate_); if (!arg->ToString(isolate_->GetCurrentContext()).ToLocal(&label)) { - Shell::ReportException(isolate_, &try_catch); + try_catch.ReThrow(); return; } v8::String::Utf8Value utf8(label); @@ -94,7 +94,7 @@ void D8Console::TimeEnd(const debug::ConsoleCallArguments& args) { Local label; v8::TryCatch try_catch(isolate_); if (!arg->ToString(isolate_->GetCurrentContext()).ToLocal(&label)) { - Shell::ReportException(isolate_, &try_catch); + try_catch.ReThrow(); return; } v8::String::Utf8Value utf8(label); diff --git a/test/message/console.js b/test/message/console.js index f49ce4c608..ceab02e9a7 100644 --- a/test/message/console.js +++ b/test/message/console.js @@ -21,5 +21,3 @@ console.warn("warn", { toString: () => 2 }); console.error("error"); console.debug("debug"); console.info("info"); - -console.info({ toString: () => {throw new Error("exception");} }) diff --git a/test/message/console.out b/test/message/console.out index 7813ccd025..b32e538941 100644 --- a/test/message/console.out +++ b/test/message/console.out @@ -6,10 +6,3 @@ log more warn 2 debug info -*%(basename)s:25: Error: exception -console.info({ toString: () => {throw new Error("exception");} }) - ^ -Error: exception - at Object.toString (*%(basename)s:25:39) - at console.info () - at *%(basename)s:25:9 diff --git a/test/mjsunit/regress/regress-crbug-714696.js b/test/mjsunit/regress/regress-crbug-714696.js deleted file mode 100644 index 0a911e4778..0000000000 --- a/test/mjsunit/regress/regress-crbug-714696.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -new Intl.v8BreakIterator(); -new Intl.DateTimeFormat(); -console.log({ toString: function() { throw 1; }}); -new Intl.v8BreakIterator();