DescriptionImprove 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. #Messages
Total messages: 12 (0 generated)
|