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

Issue 21761002: Improve internal stringifcation for custom Error objects. (Closed)

Created:
7 years, 4 months ago by Mike West
Modified:
7 years, 4 months ago
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

Improve internal stringifcation for custom Error objects. If an developer attempts to "subclass" Error by running `MyError.prototype = new Error();`, then the internal v8::Message object that's produced and handed off to `window.onerror` handlers is poorly stringified as "[object Object]". This patch adjusts the stringification process for these objects to include not only native Error objects, but also objects that have Error in their prototype chain, and haven't overwritten Error.toString with some custom variant. BUG=2822 R=mstarzinger@chromium.org, yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=16075

Patch Set 1 #

Total comments: 2

Patch Set 2 : Better. #

Total comments: 1

Patch Set 3 : Inlining. #

Patch Set 4 : GetDataProperty. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -11 lines) Patch
M src/messages.js View 1 2 3 3 chunks +13 lines, -9 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 3 chunks +54 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Mike West
Hey Michael, you might or might not be the right person to review this patch ...
7 years, 4 months ago (2013-08-02 08:14:31 UTC) #1
Michael Starzinger
Left comments and also adding Yang as a reviewer as he is more familiar with ...
7 years, 4 months ago (2013-08-02 11:47:04 UTC) #2
Mike West
Thanks, Michael. I look forward to what Yang has to say next week. :) https://codereview.chromium.org/21761002/diff/1/src/messages.js ...
7 years, 4 months ago (2013-08-02 12:04:50 UTC) #3
Michael Starzinger
LGTM with one final comment to address. I would still wait for Yang's approval though. ...
7 years, 4 months ago (2013-08-02 12:16:01 UTC) #4
Mike West
On 2013/08/02 12:16:01, Michael Starzinger wrote: > LGTM with one final comment to address. I ...
7 years, 4 months ago (2013-08-02 12:20:23 UTC) #5
Michael Starzinger
On 2013/08/02 12:20:23, Mike West wrote: > On 2013/08/02 12:16:01, Michael Starzinger wrote: > > ...
7 years, 4 months ago (2013-08-02 12:21:57 UTC) #6
Mike West
Thank you again. Latest patchset merges the check into a renamed method. Let's see what ...
7 years, 4 months ago (2013-08-02 12:32:58 UTC) #7
Yang
On 2013/08/02 12:32:58, Mike West wrote: > Thank you again. Latest patchset merges the check ...
7 years, 4 months ago (2013-08-05 13:42:59 UTC) #8
Mike West
On 2013/08/05 13:42:59, Yang wrote: > On 2013/08/02 12:32:58, Mike West wrote: > > Thank ...
7 years, 4 months ago (2013-08-05 13:50:50 UTC) #9
Yang
On 2013/08/05 13:50:50, Mike West wrote: > On 2013/08/05 13:42:59, Yang wrote: > > On ...
7 years, 4 months ago (2013-08-06 11:15:08 UTC) #10
Mike West
On 2013/08/06 11:15:08, Yang wrote: > On 2013/08/05 13:50:50, Mike West wrote: > > On ...
7 years, 4 months ago (2013-08-06 11:46:29 UTC) #11
Yang
7 years, 4 months ago (2013-08-06 13:58:26 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 manually as r16075 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698