Bug 37340 - Web Inspector: Fixes "wrong parent" for GCEvents that come at the end of a timeline record node.
Summary: Web Inspector: Fixes "wrong parent" for GCEvents that come at the end of a ti...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-09 09:10 PDT by jaimeyap
Modified: 2010-04-09 17:41 PDT (History)
5 users (show)

See Also:


Attachments
patch (3.83 KB, patch)
2010-04-09 09:13 PDT, jaimeyap
no flags Details | Formatted Diff | Diff
removes extra line from Changelog (3.79 KB, patch)
2010-04-09 10:44 PDT, jaimeyap
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.