diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2017-06-27 10:53:55 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-09-13 17:16:41 +0300 |
commit | dc1996dd1f87ba0e90201ffbc7cb133e2ea6b1b2 (patch) | |
tree | 3d7026b5bc0bcc7c77c6e4b571b020ede26e293e /src/v8ustack.d | |
parent | 31ce2c1b92855726a5d9ac035e41ef430379e40e (diff) |
src: fix SmartOS compilation
Refs: https://github.com/nodejs/node-v8/issues/8
PR-URL: https://github.com/nodejs/node/pull/14730
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/v8ustack.d')
-rw-r--r-- | src/v8ustack.d | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/v8ustack.d b/src/v8ustack.d index 8faaf467ab3..e2eeb2da3e6 100644 --- a/src/v8ustack.d +++ b/src/v8ustack.d @@ -21,6 +21,7 @@ ((value & V8_SmiTagMask) == V8_SmiTag) #define SMI_VALUE(value) \ ((uint32_t) ((value) >> V8_SmiValueShift)) +#define NO_SHARED_FUNCTION_NAME_SENTINEL NULL /* * Heap objects usually start off with a Map pointer, itself another heap @@ -372,7 +373,8 @@ dtrace:helper:ustack: this->shared = (off_t) 0; this->map = (off_t) 0; this->attrs = 0; - this->funcnamestr = (off_t) 0; + this->funcrawnamestr = (off_t) 0; + this->hassharedname = 0; this->funcnamelen = 0; this->funcnameattrs = 0; this->script = (off_t) 0; @@ -515,9 +517,16 @@ dtrace:helper:ustack: this->attrs = 0; this->shared = COPYIN_PTR(this->func + V8_OFF_FUNC_SHARED); - this->funcnamestr = COPYIN_PTR(this->shared + V8_OFF_SHARED_NAME); - LOAD_STRFIELDS(this->funcnamestr, this->funcnamelen, - this->funcnameattrs); + this->funcrawnamestr = COPYIN_PTR(this->shared + V8_OFF_RAW_NAME); + this->hassharedname = this->funcrawnamestr != + NO_SHARED_FUNCTION_NAME_SENTINEL; +} + +dtracr:helper:ustack: +/!this->done && this->hassharedname/ +{ + LOAD_STRFIELDS(this->funcrawnamestr, this->funcnamelen, + this->funcnameattrs); } dtrace:helper:ustack: @@ -532,8 +541,8 @@ dtrace:helper:ustack: APPEND_CHR('s'); APPEND_CHR(' '); - this->funcnamestr = COPYIN_PTR(this->shared + V8_OFF_SHARED_IDENT); - LOAD_STRFIELDS(this->funcnamestr, this->funcnamelen, + this->funcrawnamestr = COPYIN_PTR(this->shared + V8_OFF_SHARED_IDENT); + LOAD_STRFIELDS(this->funcrawnamestr, this->funcnamelen, this->funcnameattrs); } @@ -545,7 +554,7 @@ dtrace:helper:ustack: APPEND_CHR(')'); } -APPEND_V8STR(this->funcnamestr, this->funcnamelen, this->funcnameattrs) +APPEND_V8STR(this->funcrawnamestr, this->funcnamelen, this->funcnameattrs) /* * Now look for the name of the script where the function was defined. The |