[Webkit-unassigned] [Bug 36839] Web Inspector: Adds the ability to get the function symbol name when looking up call location.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 5 08:07:34 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36839





--- Comment #5 from jaimeyap at google.com  2010-04-05 08:07:34 PST ---
(In reply to comment #4)
> (From update of attachment 52062 [details])
> > -    if (!V8Proxy::sourceName(*sourceName) || !V8Proxy::sourceLineNumber(*sourceLineNumber))
> > +    if (!V8Proxy::sourceName(*sourceName) || !V8Proxy::sourceLineNumber(*sourceLineNumber) || !V8Proxy::funcName(*funcName))
> 
> This looks very inefficient - we should try fetching all at a time.
> 
> > +    DEFINE_STATIC_LOCAL(const char*, frameSourceLine,
> >          ("function frameSourceLine(exec_state) {"
> >          "  return exec_state.frame(0).sourceLine();"
> 
> This looks like a very old WebKit. Recent ones require  checks for frame count.
> 
> > +bool V8Proxy::funcName(String& result)
> > +{
> 
> I think we are going to have a bunch of methods like this and I am not sure we
> should put them into V8Proxy. There is a nice new ScriptDebugServer class in
> bindings that abstracts us from JS engine. It is nearly blank now, but we are
> working on filling it. I think all three methods should be defined there and it
> should own the utility context business as a whole. It would give us more
> flexibility and we'll be able to fetch all the info you need within single call
> (such as top stack frames, etc.). We should move ScriptCallStack::callLocation
> there as well.

This sounds good. Do you want me to refactor this to fetch everything in a
single call in this patch?

I believe that returning a single JavaScript object would mean that we need to
make the StackFrame information opaque to C++... or else we will have a fairly
unmaintainable change cross platform.

ScriptCallStack and ScriptCallFrame both have API that expose the stack frame
information in C++ land. This gets more complicated since Console and
ConsoleMessage depend on being able to read this information in C++ when
talking to the Inspector.

I am interested in your opinion on what this refactor should look like. Should
I also ping Yurys?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list