[Webkit-unassigned] [Bug 37502] Web Inspector: Removes public callLocation API from ScriptCallStack and replaces with ability to get top 10 stack frames

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 13 20:45:36 PDT 2010


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





--- Comment #2 from Pavel Feldman <pfeldman at chromium.org>  2010-04-13 20:45:36 PST ---
(From update of attachment 53257)
> +    static bool stackTrace(String& stackTrace);

Should be String* as in other places returning values.

>  InspectorTimelineAgent::InspectorTimelineAgent(InspectorFrontend* frontend)
> -    : m_frontend(frontend)
> +    : m_frontend(frontend),
> +      m_currentStackTrace(),

No need to init this one.

> +      m_hasStackTrace(false)

Is following true?

m_hasStackTrace == !m_currentStackTrace.isEmpty()

>  {
>      ++s_instanceCount;
>      ScriptGCEvent::addEventListener(this);
> @@ -57,7 +60,7 @@ InspectorTimelineAgent::InspectorTimelin
>  void InspectorTimelineAgent::pushGCEventRecords()
>  {
>      for (GCEvents::iterator i = m_gcEvents.begin(); i != m_gcEvents.end(); ++i) {
> -        ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, i->startTime);
> +        ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, i->startTime, getCurrentStackTrace());

Present stack has nothing to do with the stack while doing GC.

> +    if (m_recordStack.isEmpty()) {
>          m_frontend->addRecordToTimeline(record);
> -    else {
> +        invalidateStackTrace();
> +    } else {
>          TimelineRecordEntry parent = m_recordStack.last();
>          parent.children.set(parent.children.length(), record);
>      }

No need for { } in single-line statements.

> +String* InspectorTimelineAgent::getCurrentStackTrace()
> +{
> +    if (m_currentStackTrace.isEmpty()) {

I wonder if you covered all the cases where stack needs to be invalidated. How
often do we get nested records where this cache is actually helping?

-- 
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