Commit 95d53ffe authored by yangguo's avatar yangguo Committed by Commit bot

Revert of [d8] console methods must not throw. (patchset #1 id:1 of...

Revert of [d8] console methods must not throw. (patchset #1 id:1 of https://codereview.chromium.org/2838143002/ )

Reason for revert:
Breaks no-intl builds.

Original issue's description:
> [d8] console methods must not throw.
>
> R=jarin@chromium.org
> BUG=chromium:714696
>
> Review-Url: https://codereview.chromium.org/2838143002
> Cr-Commit-Position: refs/heads/master@{#44854}
> Committed: https://chromium.googlesource.com/v8/v8/+/87b5b53f6f3321ad33b15e686590da7b57df2ff9

TBR=jarin@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:714696

Review-Url: https://codereview.chromium.org/2840853002
Cr-Commit-Position: refs/heads/master@{#44856}
parent 7a1892e3
......@@ -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(); \
}
......
......@@ -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)) {
Shell::ReportException(isolate, &try_catch);
try_catch.ReThrow();
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)) {
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<String> 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);
......
......@@ -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");} })
......@@ -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 (<anonymous>)
at *%(basename)s:25:9
// 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();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment