Skip to content

Commit

Permalink
deps: V8: fix debug backtrace for symbols
Browse files Browse the repository at this point in the history
The cherry-pick of nodejs#7612 to v4.x (4369055) added in nodejs#9298 wasn't quite
correct as it depends on a runtime function %SymbolDescriptiveString
that doesn't exist on v4.x. We can use %SymbolDescription instead.

Ref: nodejs#7612
Ref: nodejs#9298
  • Loading branch information
ofrobots committed Jan 11, 2017
1 parent 4d3e158 commit d57f561
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deps/v8/src/mirror-debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ PropertyMirror.prototype.name = function() {


PropertyMirror.prototype.toText = function() {
if (IS_SYMBOL(this.name_)) return %SymbolDescriptiveString(this.name_);
if (IS_SYMBOL(this.name_)) return %SymbolDescription(this.name_);
return this.name_;
};

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/test/mjsunit/debug-backtrace-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function listener(event, exec_state, event_data, data) {
// 2: [anonymous]
assertEquals("new Point(x=0, y=0)",
exec_state.frame(0).invocationText());
assertEquals("#<Object>[Symbol(Das Symbol)](x=0, y=0)",
assertEquals("#<Object>[Das Symbol](x=0, y=0)",
exec_state.frame(1).invocationText());
assertEquals("[anonymous]()", exec_state.frame(2).invocationText());
listenerCalled = true;
Expand Down

0 comments on commit d57f561

Please sign in to comment.