Summary: | Inspector should support console.trace | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> | ||||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Enhancement | CC: | keishi | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 14354 | ||||||||||||
Attachments: |
|
Description
Adam Roben (:aroben)
2008-05-20 16:16:08 PDT
I read CallStackSidebarPane.js but it looks like you can't get the CallFrame unless the debugger is enabled and paused.
>JavaScriptCallFrame* JavaScriptDebugServer::currentCallFrame()
>{
> if (!m_paused)
> return 0;
> return m_currentCallFrame.get();
>}
My initial thought was I could do it using arguments.callee.caller but I think ArgList doesn't have the callee info.
Created attachment 23840 [details]
Screenshot
Created attachment 23841 [details]
patch
I'm not sure if it's ok but I called Machine::retrieveCaller recursively to get a stack trace. Seems to be working.
Comment on attachment 23841 [details]
patch
Why does trace() need to be custom? [Custom] void trace(); because it passes along the exec state?
Created attachment 23843 [details]
patch
Just replaced a tab.
That was my thinking when I did that. It doesn't compile when I don't do that. (In reply to comment #5) > (From update of attachment 23841 [details] [edit]) > Why does trace() need to be custom? [Custom] void trace(); because it passes > along the exec state? > Comment on attachment 23843 [details]
patch
JSConsole::trace doesn't use the "arguments" argument. Either remove the name or the argument altogether.
In Console::trace use this->page() instead of checking the m_frame, we made a helper to do this easier.
Also please file a bug that says we should include and name (program) and (eval) nodes.
Also please edit 19229 to also give better names than (anonymous function) when possible.
Created attachment 23862 [details]
fixed patch
I couldn't remove the argument so I just removed the name.
I file a bug https://bugs.webkit.org/show_bug.cgi?id=21157 (In reply to comment #8) > Also please file a bug that says we should include and name (program) and > (eval) nodes. Landed in r37012. |