Turn message property of the error object into a data property. (issue 11368142)

14 views
Skip to first unread message

yan...@chromium.org

unread,
Nov 8, 2012, 10:26:14 AM11/8/12
to sven...@chromium.org, v8-...@googlegroups.com
Reviewers: Sven Panne,

Description:
Turn message property of the error object into a data property.

R=sven...@chromium.org
BUG=


Please review this at https://chromiumcodereview.appspot.com/11368142/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
M src/messages.cc
M src/messages.js
M src/runtime.h
M src/runtime.cc
A + test/mjsunit/error-accessors.js
M test/mjsunit/harmony/proxies.js


yan...@chromium.org

unread,
Nov 8, 2012, 10:29:57 AM11/8/12
to sven...@chromium.org, v8-...@googlegroups.com
On 2012/11/08 15:26:14, Yang wrote:

This change includes:

- Format the message string when the error object is constructed, instead of
doing it lazily. Performance impact should be low.
- Turn the message dictionary into a object literal.
- Pass message type and formatting arguments as string and array instead of
bundled into a JSMessageObject. This makes some runtime calls to extract the
values obsolete.
- A bug discovered in proxies.js has been filed in v8:2398

http://codereview.chromium.org/11368142/

sven...@chromium.org

unread,
Nov 9, 2012, 2:55:07 AM11/9/12
to yan...@chromium.org, v8-...@googlegroups.com
LGTM with a nit


http://codereview.chromium.org/11368142/diff/1/src/messages.cc
File src/messages.cc (right):

http://codereview.chromium.org/11368142/diff/1/src/messages.cc#newcode158
src/messages.cc:158: ASSERT(data->IsJSMessageObject());
No need for this ASSERT, all cast methods do this implicitly.

http://codereview.chromium.org/11368142/
Reply all
Reply to author
Forward
0 new messages