Skip to content

Instantly share code, notes, and snippets.

@krisselden
Created August 26, 2019 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisselden/e831e6abf6605e928d3a3b79259d5633 to your computer and use it in GitHub Desktop.
Save krisselden/e831e6abf6605e928d3a3b79259d5633 to your computer and use it in GitHub Desktop.
❯ ./out/x64.optdebug/d8 --allow-natives-syntax teststack.js
DebugPrint: 0x2bf167d0b3f9: [JS_ERROR_TYPE]
- map: 0x2bf153b4a549 <Map(HOLEY_ELEMENTS)> [FastProperties]
- prototype: 0x2bf15ffc62e1 <Object map = 0x2bf153b40fe9>
- elements: 0x2bf156880c21 <FixedArray[0]> [HOLEY_ELEMENTS]
- properties: 0x2bf156880c21 <FixedArray[0]> {
#stack: 0x2bf1946002f9 <AccessorInfo> (const accessor descriptor)
0x2bf156884a71 <Symbol: (stack_trace_symbol)>: 0x2bf167d0b619 <FixedArray[1]> (const data field 0)
}
0x2bf153b4a549: [Map]
- type: JS_ERROR_TYPE
- instance size: 40
- inobject properties: 2
- elements kind: HOLEY_ELEMENTS
- unused property fields: 1
- enum length: invalid
- stable_map
- back pointer: 0x2bf153b40f99 <Map(HOLEY_ELEMENTS)>
- prototype_validity cell: 0x2bf194600609 <Cell value= 1>
- instance descriptors (own) #2: 0x2bf167d0b659 <DescriptorArray[2]>
- layout descriptor: 0x0
- prototype: 0x2bf15ffc62e1 <Object map = 0x2bf153b40fe9>
- constructor: 0x2bf15ffc61b1 <JSFunction Error (sfi = 0x2bf19460fcc9)>
- dependent code: 0x2bf1568802c1 <Other heap object (WEAK_FIXED_ARRAY_TYPE)>
- construction counter: 0
{"value":"Error\n at teststack.js:1:13","writable":true,"enumerable":false,"configurable":true}
DebugPrint: 0x2bf167d0b3f9: [JS_ERROR_TYPE]
- map: 0x2bf153b4a549 <Map(HOLEY_ELEMENTS)> [FastProperties]
- prototype: 0x2bf15ffc62e1 <Object map = 0x2bf153b40fe9>
- elements: 0x2bf156880c21 <FixedArray[0]> [HOLEY_ELEMENTS]
- properties: 0x2bf156880c21 <FixedArray[0]> {
#stack: 0x2bf1946002f9 <AccessorInfo> (const accessor descriptor)
0x2bf156884a71 <Symbol: (stack_trace_symbol)>: 0x2bf167d0b6a1 <String[30]\: Error\n at teststack.js:1:13> (data field 0)
}
0x2bf153b4a549: [Map]
- type: JS_ERROR_TYPE
- instance size: 40
- inobject properties: 2
- elements kind: HOLEY_ELEMENTS
- unused property fields: 1
- enum length: invalid
- stable_map
- back pointer: 0x2bf153b40f99 <Map(HOLEY_ELEMENTS)>
- prototype_validity cell: 0x2bf194600609 <Cell value= 1>
- instance descriptors (own) #2: 0x2bf167d0b659 <DescriptorArray[2]>
- layout descriptor: 0x0
- prototype: 0x2bf15ffc62e1 <Object map = 0x2bf153b40fe9>
- constructor: 0x2bf15ffc61b1 <JSFunction Error (sfi = 0x2bf19460fcc9)>
- dependent code: 0x2bf1568802c1 <Other heap object (WEAK_FIXED_ARRAY_TYPE)>
- construction counter: 0
DebugPrint: 0x2bf167d0b961: [JS_OBJECT_TYPE]
- map: 0x2bf153b465d9 <Map(HOLEY_ELEMENTS)> [DictionaryProperties]
- prototype: 0x2bf15ffc2099 <Object map = 0x2bf153b40229>
- elements: 0x2bf156880c21 <FixedArray[0]> [HOLEY_ELEMENTS]
- properties: 0x2bf167d0bc01 <NameDictionary[17]> {
0x2bf156884a71 <Symbol: (stack_trace_symbol)>: 0x2bf167d0bb91 <FixedArray[1]> (data, dict_index: 1, attrs: [W_C])
#stack: 0x2bf1946002f9 <AccessorInfo> (accessor, dict_index: 2, attrs: [W_C])
}
0x2bf153b465d9: [Map]
- type: JS_OBJECT_TYPE
- instance size: 24
- inobject properties: 0
- elements kind: HOLEY_ELEMENTS
- unused property fields: 0
- enum length: invalid
- dictionary_map
- may_have_interesting_symbols
- back pointer: 0x2bf1568804d1 <undefined>
- prototype_validity cell: 0x2bf194600609 <Cell value= 1>
- instance descriptors (own) #0: 0x2bf156880259 <DescriptorArray[0]>
- layout descriptor: 0x0
- prototype: 0x2bf15ffc2099 <Object map = 0x2bf153b40229>
- constructor: 0x2bf15ffc20d1 <JSFunction Object (sfi = 0x2bf194609ae1)>
- dependent code: 0x2bf1568802c1 <Other heap object (WEAK_FIXED_ARRAY_TYPE)>
- construction counter: 0
{"value":"Error\n at teststack.js:6:7","writable":true,"enumerable":false,"configurable":true}
DebugPrint: 0x2bf167d0b961: [JS_OBJECT_TYPE]
- map: 0x2bf153b465d9 <Map(HOLEY_ELEMENTS)> [DictionaryProperties]
- prototype: 0x2bf15ffc2099 <Object map = 0x2bf153b40229>
- elements: 0x2bf156880c21 <FixedArray[0]> [HOLEY_ELEMENTS]
- properties: 0x2bf167d0bc01 <NameDictionary[17]> {
0x2bf156884a71 <Symbol: (stack_trace_symbol)>: 0x2bf167d0bc99 <String[29]\: Error\n at teststack.js:6:7> (data, dict_index: 1, attrs: [W_C])
#stack: 0x2bf1946002f9 <AccessorInfo> (accessor, dict_index: 2, attrs: [W_C])
}
0x2bf153b465d9: [Map]
- type: JS_OBJECT_TYPE
- instance size: 24
- inobject properties: 0
- elements kind: HOLEY_ELEMENTS
- unused property fields: 0
- enum length: invalid
- dictionary_map
- may_have_interesting_symbols
- back pointer: 0x2bf1568804d1 <undefined>
- prototype_validity cell: 0x2bf194600609 <Cell value= 1>
- instance descriptors (own) #0: 0x2bf156880259 <DescriptorArray[0]>
- layout descriptor: 0x0
- prototype: 0x2bf15ffc2099 <Object map = 0x2bf153b40229>
- constructor: 0x2bf15ffc20d1 <JSFunction Object (sfi = 0x2bf194609ae1)>
- dependent code: 0x2bf1568802c1 <Other heap object (WEAK_FIXED_ARRAY_TYPE)>
- construction counter: 0
const err = new Error();
%DebugPrint(err);
print(JSON.stringify(Object.getOwnPropertyDescriptor(err, 'stack')));
%DebugPrint(err);
const obj = {};
Error.captureStackTrace(obj);
%DebugPrint(obj);
print(JSON.stringify(Object.getOwnPropertyDescriptor(obj, 'stack')));
%DebugPrint(obj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment