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

Issue 1593553002: [runtime] Throw exception for derived constructors in correct context. (Closed)

Created:
4 years, 11 months ago by Camillo Bruni
Modified:
4 years, 11 months ago
CC:
v8-mips-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[runtime] Throw exception for derived constructors in correct context. When derived constructors return a non-object (or not undefined) we currently throw an exception directly in the callee context. This was achieved by desugaring the return statement for derived classes. To be spec compliamnt a separate ConstructStubForDerived is introduced. Instead of trowing directly, the desugared return statement inside a derived constructor only returns an integer to indicate an incompatible result. BUG=v8:4509 LOG=n Committed: https://crrev.com/c86f1897ac52f2cae088d6cab8843216bdaa9396 Cr-Commit-Position: refs/heads/master@{#33336}

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 2

Patch Set 3 : addressing nits #

Patch Set 4 : reuse the existing error message #

Patch Set 5 : update runtime function args length dcheck #

Patch Set 6 : disable regression test for ignition #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -73 lines) Patch
M src/arm/builtins-arm.cc View 1 2 3 3 chunks +24 lines, -4 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 1 2 3 3 chunks +24 lines, -4 lines 0 comments Download
M src/builtins.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 3 4 chunks +25 lines, -6 lines 0 comments Download
M src/mips/builtins-mips.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/parsing/parser.cc View 1 2 2 chunks +6 lines, -7 lines 0 comments Download
M src/ppc/builtins-ppc.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 1 chunk +44 lines, -43 lines 0 comments Download
M src/runtime/runtime-classes.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-internal.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 3 3 chunks +24 lines, -4 lines 0 comments Download
M src/x87/builtins-x87.cc View 1 2 3 3 chunks +24 lines, -4 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A test/mjsunit/regress/regress-4509-Class-constructor-typeerror-realm.js View 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (15 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593553002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593553002/1
4 years, 11 months ago (2016-01-15 10:28:54 UTC) #3
Camillo Bruni
PTAL mips-team, ppc-team: Please port this CL, thanks.
4 years, 11 months ago (2016-01-15 10:34:04 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/14129)
4 years, 11 months ago (2016-01-15 10:43:44 UTC) #7
Benedikt Meurer
LGTM.
4 years, 11 months ago (2016-01-15 10:47:01 UTC) #8
Camillo Bruni
rossberg: could you check the changes in parsing/*? thanks.
4 years, 11 months ago (2016-01-15 10:49:56 UTC) #10
rossberg
Parser changes LGTM up to nits. https://codereview.chromium.org/1593553002/diff/20001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1593553002/diff/20001/src/parsing/parser.cc#newcode2728 src/parsing/parser.cc:2728: // and throw ...
4 years, 11 months ago (2016-01-15 11:02:47 UTC) #11
balazs.kilvady
We are working on the MIPS port.
4 years, 11 months ago (2016-01-15 11:09:01 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593553002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593553002/40001
4 years, 11 months ago (2016-01-15 11:38:31 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/12387) v8_linux64_avx2_rel on ...
4 years, 11 months ago (2016-01-15 11:51:44 UTC) #16
balazs.kilvady
Please find the MIPS port at: https://codereview.chromium.org/1593603002/
4 years, 11 months ago (2016-01-15 13:23:24 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593553002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593553002/60001
4 years, 11 months ago (2016-01-15 13:49:51 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/14156)
4 years, 11 months ago (2016-01-15 14:05:41 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593553002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593553002/80001
4 years, 11 months ago (2016-01-15 14:13:36 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_arm_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel/builds/12458)
4 years, 11 months ago (2016-01-15 14:43:34 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593553002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593553002/100001
4 years, 11 months ago (2016-01-15 15:10:14 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 11 months ago (2016-01-15 15:31:05 UTC) #30
commit-bot: I haz the power
4 years, 11 months ago (2016-01-15 15:31:37 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c86f1897ac52f2cae088d6cab8843216bdaa9396
Cr-Commit-Position: refs/heads/master@{#33336}

Powered by Google App Engine
This is Rietveld 408576698