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

Issue 1124063002: X87: Handle the case when derived constructor is [[Call]]ed with 0 args. (Closed)

Created:
5 years, 7 months ago by chunyang.dai
Modified:
5 years, 7 months ago
Reviewers:
Weiliang
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

X87: Handle the case when derived constructor is [[Call]]ed with 0 args. port cf53fed972896bf23c037ce7ac9f8e1512463c62 (r28242). original commit message: ArgumentsAdaptorStub for derived constructor (the one that needs new.target) works in this way: - If the constructor is invoked via the Construct stub, we know that actual arguments always include new.target. ``arguments`` object however should not include a new.target, therefore we remove it. We achieve this by decrementing the argument count. - If the constructor is invoked as a call, we do not care for a correct ``arguments`` array since the constructor will immediately throw on entrance. The bug is that the call could actually pass 0 actual arguments, but I decrement unconditionally :(. The fix is to detect this case and avoid decrementing. ``arguments`` is bogus, but it is ok as constructor throws. Long-term we should just remove mucking about with arguments for new.target and just get it from the stack. BUG= Committed: https://crrev.com/5f047ff651a51a95f9625aab26c2a4a5f4f37587 Cr-Commit-Position: refs/heads/master@{#28246}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M src/x87/code-stubs-x87.cc View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
chunyang.dai
PTAL.
5 years, 7 months ago (2015-05-06 02:29:43 UTC) #2
Weiliang
lgtm
5 years, 7 months ago (2015-05-06 03:23:21 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124063002/1
5 years, 7 months ago (2015-05-06 03:23:39 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 7 months ago (2015-05-06 03:46:55 UTC) #6
commit-bot: I haz the power
5 years, 7 months ago (2015-05-06 03:47:07 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/5f047ff651a51a95f9625aab26c2a4a5f4f37587
Cr-Commit-Position: refs/heads/master@{#28246}

Powered by Google App Engine
This is Rietveld 408576698