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

Issue 2838143002: [d8] console methods must not throw. (Closed)

Created:
3 years, 8 months ago by Yang
Modified:
3 years, 7 months ago
Reviewers:
kozy, Jarin
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : fix for non-intl build #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -3 lines) Patch
M src/builtins/builtins-console.cc View 1 chunk +2 lines, -0 lines 1 comment Download
M src/d8-console.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M test/message/console.js View 1 chunk +2 lines, -0 lines 0 comments Download
M test/message/console.out View 1 chunk +7 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-crbug-714696.js View 1 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (13 generated)
Yang
3 years, 8 months ago (2017-04-25 10:00:05 UTC) #1
Jarin
lgtm
3 years, 8 months ago (2017-04-25 13:45:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2838143002/1
3 years, 8 months ago (2017-04-25 13:46:20 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/v8/v8/+/87b5b53f6f3321ad33b15e686590da7b57df2ff9
3 years, 8 months ago (2017-04-25 13:47:41 UTC) #11
Yang
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2840853002/ by yangguo@chromium.org. ...
3 years, 8 months ago (2017-04-25 14:00:45 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2838143002/20001
3 years, 8 months ago (2017-04-26 09:25:21 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/v8/v8/+/a6b27a725fd233fdbd52fc7519b32deab0c0e05a
3 years, 8 months ago (2017-04-26 09:48:36 UTC) #19
kozy
https://codereview.chromium.org/2838143002/diff/20001/src/builtins/builtins-console.cc File src/builtins/builtins-console.cc (right): https://codereview.chromium.org/2838143002/diff/20001/src/builtins/builtins-console.cc#newcode48 src/builtins/builtins-console.cc:48: CHECK(!isolate->has_pending_exception()); \ What is motivation behind this check? I ...
3 years, 8 months ago (2017-04-26 23:00:42 UTC) #21
Yang
On 2017/04/26 23:00:42, kozy wrote: > https://codereview.chromium.org/2838143002/diff/20001/src/builtins/builtins-console.cc > File src/builtins/builtins-console.cc (right): > > https://codereview.chromium.org/2838143002/diff/20001/src/builtins/builtins-console.cc#newcode48 > ...
3 years, 7 months ago (2017-04-27 08:29:16 UTC) #22
kozy
3 years, 7 months ago (2017-04-27 18:46:27 UTC) #23
Message was sent while issue was closed.
On 2017/04/27 08:29:16, Yang wrote:
> On 2017/04/26 23:00:42, kozy wrote:
> >
>
https://codereview.chromium.org/2838143002/diff/20001/src/builtins/builtins-c...
> > File src/builtins/builtins-console.cc (right):
> > 
> >
>
https://codereview.chromium.org/2838143002/diff/20001/src/builtins/builtins-c...
> > src/builtins/builtins-console.cc:48:
CHECK(!isolate->has_pending_exception());
>  
> > \
> > What is motivation behind this check?
> > I just wondering because there is some current console-spec work in progress
> and
> > one of the proposals is to use real toString [1] for
> > console.time({toString:()=>"123"}) and in some other methods.
> > 
> > [1] crbug.com/696805
> 
> Console builtins currently do not propagate exceptions. If the console
builtins
> triggers an exception and does not catch it, the isolate will have a pending
> exception.
> From how the console builtins behave in Chrome, they are expected to swallow
> exceptions. Which is what is done here as well. In the d8 implementation, we
do
> call toString. But if that throws, the exception is caught and discarded. The
> CHECK simply guards this requirement.

I see, thank you!

Powered by Google App Engine
This is Rietveld 408576698