Skip to content

Commit

Permalink
Revert of [d8] console methods must not throw. (patchset #1 id:1 of h…
Browse files Browse the repository at this point in the history
…ttps://codereview.chromium.org/2838143002/ )

Reason for revert:
Breaks no-intl builds.

Original issue's description:
> [d8] console methods must not throw.
>
> [email protected]
> 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

[email protected]
# 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}
  • Loading branch information
hashseed authored and Commit bot committed Apr 25, 2017
1 parent 7a1892e commit 95d53ff
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 22 deletions.
2 changes: 0 additions & 2 deletions src/builtins/builtins-console.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(); \
}
Expand Down
6 changes: 3 additions & 3 deletions src/d8-console.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions test/message/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");} })
7 changes: 0 additions & 7 deletions test/message/console.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 0 additions & 8 deletions test/mjsunit/regress/regress-crbug-714696.js

This file was deleted.

0 comments on commit 95d53ff

Please sign in to comment.