Skip to content
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

Mani #78

Closed
Manimalini opened this issue Dec 5, 2014 · 0 comments · May be fixed by olegnn/node#29, erdun/node#34 or saeedahassan/node#28
Closed

Mani #78

Manimalini opened this issue Dec 5, 2014 · 0 comments · May be fixed by olegnn/node#29, erdun/node#34 or saeedahassan/node#28

Comments

@Manimalini
Copy link

No description provided.

kunalspathak added a commit to kunalspathak/node that referenced this issue Feb 26, 2017
1. We parse error stack in chakra_shim to make it simliar to that
of v8. However we were missing the case if stack messages has
`\n`. Fixed it.
Fixes: nodejs#78

2. Fixed Error.captureStackTrace

Since `chakra_shim.js` that patches `Error.captureStackTrace` runs
under strict mode, it was not able to get caller information. Having
caller information is much reliable in captureStackTrace than
matching using `function.name`. Removed `use strict` and disabled
eslint rule for `use strict`.
This helped in matching caller exactly regardless of name of form
`o.p.q` in `Error.captureStackTrace`.

Fixes: nodejs#75

3. Added missing functions on StackFrame

Added following missing methods on StackFrame:
* getFunction
* getMethodName
* getTypeName
* isConstructor
* isToplevel
* isNative

Implemented `getFunction`.

`getFunction` currently works if `.stack` is called from same
callsite where `new Error()` or `Error.captureStackTrace()` was
called. However currently we don't record and store the callstack
when these functions were called and so we lose the information
of `.caller` when called later while populating `e.stack`.

If we save the callstack, we would be holding references to all the
functions in the callstack which doesn't seem right.

I have added a TODO to solve this, but wanted to send this out
so we get better coverage on node compatibility.

Fixes : nodejs#70

PR-URL: nodejs/node-chakracore#85
Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment