-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: add rudimentary Promise support #272
Conversation
The metadata landed in v8/v8@8aaa186ed42, it will be available in Node.js v12. We can backport if we want this in Node.js v10. |
@mmarchini can you also update https://github.com/nodejs/node/blob/master/test/v8-updates/test-postmortem-metadata.js (or just ping me and I can do it). |
This patch allows llnode to list Promise objects with findjsobjects, findjsinstances and findrefs. We can investigate more fancy Promise features in the future (such as listing handlers, Promise status, etc.). For Node.js v10.x, since we don't have the JS_PROMISE type as postmortem metadata, we assume JS_PROMISE is the next type after JS_MESSAGE_OBJECT_TYPE. This is a safe assumption for Node.js v10.x, v12.x has the JS_PROMISE type, and v8.x is not supported anymore. ```console $ git log v10.0.0..v10.17.0 -L :InstanceType:deps/v8/src/objects.h | grep -C2 "JS_PROMISE" JS_MAP_VALUE_ITERATOR_TYPE, JS_MESSAGE_OBJECT_TYPE, JS_PROMISE_TYPE, JS_REGEXP_TYPE, JS_REGEXP_STRING_ITERATOR_TYPE, -- JS_MAP_VALUE_ITERATOR_TYPE, JS_MESSAGE_OBJECT_TYPE, JS_PROMISE_TYPE, JS_REGEXP_TYPE, + JS_REGEXP_STRING_ITERATOR_TYPE, ```
type_JSPromise__JS_PROMISE_TYPE and type_JSMessageObject__JS_MESSAGE_OBJECT_TYPE will be used on llnode to identify Promises in memory and core dumps: nodejs/llnode#272. Add these to our postmortem test so we're aware of any changes to this metadata.
@cjihrig done nodejs/node#31357 I also updated the pull request with a presumably safe default for |
type_JSPromise__JS_PROMISE_TYPE and type_JSMessageObject__JS_MESSAGE_OBJECT_TYPE will be used on llnode to identify Promises in memory and core dumps: nodejs/llnode#272. Add these to our postmortem test so we're aware of any changes to this metadata. PR-URL: #31357 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
type_JSPromise__JS_PROMISE_TYPE and type_JSMessageObject__JS_MESSAGE_OBJECT_TYPE will be used on llnode to identify Promises in memory and core dumps: nodejs/llnode#272. Add these to our postmortem test so we're aware of any changes to this metadata. PR-URL: #31357 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This patch allows llnode to list Promise objects with findjsobjects, findjsinstances and findrefs. We can investigate more fancy Promise features in the future (such as listing handlers, Promise status, etc.). For Node.js v10.x, since we don't have the JS_PROMISE type as postmortem metadata, we assume JS_PROMISE is the next type after JS_MESSAGE_OBJECT_TYPE. This is a safe assumption for Node.js v10.x, v12.x has the JS_PROMISE type, and v8.x is not supported anymore. ```console $ git log v10.0.0..v10.17.0 -L :InstanceType:deps/v8/src/objects.h \ | grep -C2 "JS_PROMISE" JS_MAP_VALUE_ITERATOR_TYPE, JS_MESSAGE_OBJECT_TYPE, JS_PROMISE_TYPE, JS_REGEXP_TYPE, JS_REGEXP_STRING_ITERATOR_TYPE, -- JS_MAP_VALUE_ITERATOR_TYPE, JS_MESSAGE_OBJECT_TYPE, JS_PROMISE_TYPE, JS_REGEXP_TYPE, + JS_REGEXP_STRING_ITERATOR_TYPE, ``` PR-URL: #272
Landed in 991c731 |
Pull Request Test Coverage Report for Build 2b5721172516eef0643525467a6365e913a191d3-PR-272Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
This patch allows llnode to list Promise objects with findjsobjects,
findjsinstances and findrefs. We can investigate more fancy Promise
features in the future (such as listing handlers, Promise status, etc.).