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: 87b5b53f6f
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}
This commit is contained in:
parent
7a1892e3bb
commit
95d53ffee1
@ -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
|
||||
|
@ -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();
|
Loading…
Reference in New Issue
Block a user