Browse Source

deps: V8: fix debug backtrace for symbols

The cherry-pick of #7612 to v4.x (4369055) added in #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: https://github.com/nodejs/node/pull/7612
Ref: https://github.com/nodejs/node/pull/9298

PR-URL: https://github.com/nodejs/node/pull/10732
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v4.x
Ali Ijaz Sheikh 8 years ago
committed by Myles Borins
parent
commit
81e9a3bfcb
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 2
      deps/v8/include/v8-version.h
  2. 2
      deps/v8/src/mirror-debugger.js
  3. 2
      deps/v8/test/mjsunit/debug-backtrace-text.js

2
deps/v8/include/v8-version.h

@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4 #define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 5 #define V8_MINOR_VERSION 5
#define V8_BUILD_NUMBER 103 #define V8_BUILD_NUMBER 103
#define V8_PATCH_LEVEL 43 #define V8_PATCH_LEVEL 44
// Use 1 for candidates and 0 otherwise. // Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.) // (Boolean macro values are not supported by all preprocessors.)

2
deps/v8/src/mirror-debugger.js

@ -1515,7 +1515,7 @@ PropertyMirror.prototype.name = function() {
PropertyMirror.prototype.toText = 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_; return this.name_;
}; };

2
deps/v8/test/mjsunit/debug-backtrace-text.js

@ -106,7 +106,7 @@ function listener(event, exec_state, event_data, data) {
// 2: [anonymous] // 2: [anonymous]
assertEquals("new Point(x=0, y=0)", assertEquals("new Point(x=0, y=0)",
exec_state.frame(0).invocationText()); 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()); exec_state.frame(1).invocationText());
assertEquals("[anonymous]()", exec_state.frame(2).invocationText()); assertEquals("[anonymous]()", exec_state.frame(2).invocationText());
listenerCalled = true; listenerCalled = true;

Loading…
Cancel
Save