WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
70605
First stack frame when evaluating a script is missing
https://bugs.webkit.org/show_bug.cgi?id=70605
Summary
First stack frame when evaluating a script is missing
Michael Schneider
Reported
2011-10-21 07:16:14 PDT
To reproduce 1) Open Safari on
http://poshnet.ch/stack_test.html
. It contains the script function foo() { console.trace(); } console.trace(); foo(); 2) Open the console observe: the output is console.trace() (anonymous function) console.trace() foo Note that the second trace is missing the bottom frame, the anonymous evaluate script. This is very confusing as it looks as if the browser invoked foo directly. Chrome shows the (anonymous function) stack frame in both cases. This seems to be due to ScriptCallStackFactory.cpp:73 if (function) functionName = asFunction(function)->name(exec); else { // Caller is unknown, but if frames is empty we should still add the frame, because // something called us, and gave us arguments. if (!frames.isEmpty()) break; } where anonymous frames (such as the script eval) are dropped if other stack frames are on top of it. What is the exact purpose of that "if"? If we can change that, ie. drop the else, I'm more than happy to provide a patch.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug