diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-07-07 14:29:32 -0700 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-07-18 11:00:56 +0200 |
commit | 5cdbbdf94d6f656230293ddd2a71dedf11cab17d (patch) | |
tree | a3de6a280a3c31d40ccfc8081569ba8bc64ce40a /deps/v8/src | |
parent | 48c52d765d474eb3d10699b6eda4a9ec23202db5 (diff) | |
download | android-node-v8-5cdbbdf94d6f656230293ddd2a71dedf11cab17d.tar.gz android-node-v8-5cdbbdf94d6f656230293ddd2a71dedf11cab17d.tar.bz2 android-node-v8-5cdbbdf94d6f656230293ddd2a71dedf11cab17d.zip |
deps: cherry-pick 1f53e42 from v8 upstream
Original commit message:
Handle symbols in FrameMirror#invocationText().
Fix a TypeError when putting together the invocationText for a
symbol method's stack frame.
See https://github.com/nodejs/node/issues/7536.
Review-Url: https://codereview.chromium.org/2122793003
Cr-Commit-Position: refs/heads/master@{#37597}
Fixes: https://github.com/nodejs/node/issues/7536
PR-URL: https://github.com/nodejs/node/pull/7612
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'deps/v8/src')
-rw-r--r-- | deps/v8/src/debug/mirrors.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/deps/v8/src/debug/mirrors.js b/deps/v8/src/debug/mirrors.js index 881f303f29..0696ec988e 100644 --- a/deps/v8/src/debug/mirrors.js +++ b/deps/v8/src/debug/mirrors.js @@ -1495,6 +1495,12 @@ PropertyMirror.prototype.name = function() { }; +PropertyMirror.prototype.toText = function() { + if (IS_SYMBOL(this.name_)) return %SymbolDescriptiveString(this.name_); + return this.name_; +}; + + PropertyMirror.prototype.isIndexed = function() { for (var i = 0; i < this.name_.length; i++) { if (this.name_[i] < '0' || '9' < this.name_[i]) { @@ -2027,10 +2033,10 @@ FrameMirror.prototype.invocationText = function() { if (display_receiver) { result += '.'; } - result += property.name(); + result += property.toText(); } else { result += '['; - result += property.name(); + result += property.toText(); result += ']'; } // Also known as - if the name in the function doesn't match the name |