Bug 37340

Summary: Web Inspector: Fixes "wrong parent" for GCEvents that come at the end of a timeline record node.
Product: WebKit Reporter: jaimeyap
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, knorton, loislo, pfeldman, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
none
removes extra line from Changelog none

Description jaimeyap 2010-04-09 09:10:17 PDT
This patch fixes "wrong parent" for GCEvents that come at the end of a timeline record node.

The problem was as follows:

InspectorTimelineAgent::didCompleteRecord() pops the record stack and then
calls addRecordToTimeline()

addRecordToTimeline() pushes the GCEvents. This then attributes the GCEvents to
whatever is currently last on the record stack. Too bad the real parent has
already been popped :).

This means that the only time GCEvents are correctly parented are when they
happen to get pushed by some other peer node closing BEFORE their parent tries
to pop.

The solution:

Add a call to pushGCEventRecords() to didCompleteCurrentRecord(). Simply remove the call to pushGCEventRecords() from addRecordToTimeline() and just ensure that callers of addRecordToTimeline() push the GCEvents if they need to.
Comment 1 jaimeyap 2010-04-09 09:13:02 PDT
Created attachment 52959 [details]
patch
Comment 2 Ilya Tikhonovsky 2010-04-09 10:39:11 PDT
> Index: WebCore/ChangeLog
> ===================================================================
> --- WebCore/ChangeLog	(revision 57339)
> +++ WebCore/ChangeLog	(working copy)
> @@ -1,3 +1,22 @@
> +2010-04-09  Jaime Yap  <jaimeyap@google.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Web Inspector: Fixes "wrong parent" for GCEvents that come at the end of a
> +        timeline record node.
> +        https://bugs.webkit.org/show_bug.cgi?id=37340
> +        
> +        No new tests. (OOPS!)

Please remove this line.


The other changes looks good to me.
Comment 3 jaimeyap 2010-04-09 10:44:11 PDT
Created attachment 52968 [details]
removes extra line from Changelog
Comment 4 WebKit Commit Bot 2010-04-09 17:41:44 PDT
Comment on attachment 52968 [details]
removes extra line from Changelog

Clearing flags on attachment: 52968

Committed r57387: <http://trac.webkit.org/changeset/57387>
Comment 5 WebKit Commit Bot 2010-04-09 17:41:49 PDT
All reviewed patches have been landed.  Closing bug.