Function instrumentation does not work as expected in Chrome 12 #18

Closed
eriwen opened this Issue Apr 23, 2011 · 5 comments

2 participants

@eriwen
stacktrace.js member

Running function instrumentation test case at http://eriwen.com/js/stacktrace/testcase4.html loses bottom of stack in Chrome 12.

See test for details.

@victor-homyakov

Exception stack is somehow corrupted in printStackTrace.implementation.prototype.chrome() - before chrome() I can see one extra line in stack trace (7 lines overall), after chrome() this line is disappeared (only 6 lines left). Investigating further...

@victor-homyakov

Before chrome() (I've reformatted your test file):

"TypeError: Object #<Object> has no method 'undef'
at Object.createException (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:81:18)
at Object.run (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:66:25)
at printStackTrace (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:57:62)
at instrumented (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:114:33)
at bar (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/testcase4.html:36:9)
at http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/testcase4.html:41:9
at http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/testcase4.html:48:7"

after return this[mode](ex):

[
"Object.createException (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:81:18)",
"Object.run (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:66:25)",
"printStackTrace (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:57:62)",
"instrumented (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/stacktrace.js:114:33)",
"bar (http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/testcase4.html:36:9)",
"http://127.0.0.1:8001/DevTools/StackTrace/javascript-stacktrace/testcase4.html:48:7"
]

Line for testcase4.html:41:9 (where bar(); is invoked from foo) is disappeared after stack processing.

@victor-homyakov

I've changed in my fork script and tests - take a look. Older Chrome versions may work incorrect - original regular expression removed extra lines from stacktrace.

Also I've changed your testcase4.html - where can I put it? In your example bar() should not be expected in stacktrace.

@eriwen
stacktrace.js member

I have merged your changes and pushed. I also added the test/functional directory for those test cases. I have added link to the Jenkins page with a link to the latest functional tests.

So, just check in your testcase4.html and I'll merge it in. After your help with the 0.4 release, I'll add you as a collaborator so you don't have to go configuring this stuff yourself and we won't have to worry about merges etc.

Thanks again,
Eric

@eriwen
stacktrace.js member

Fixed, see "chrome stack" test.

@eriwen eriwen closed this Jul 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment