Bug 110466 - Web Inspector: Remove CPU profile from a group causes exception
Summary: Web Inspector: Remove CPU profile from a group causes exception
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: Alexei Filippov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-21 06:58 PST by Alexei Filippov
Modified: 2013-02-25 07:24 PST (History)
9 users (show)

See Also:


Attachments
Patch (6.31 KB, patch)
2013-02-21 08:15 PST, Alexei Filippov
no flags Details | Formatted Diff | Diff
Patch (6.62 KB, patch)
2013-02-22 01:52 PST, Alexei Filippov
no flags Details | Formatted Diff | Diff
Patch (6.46 KB, patch)
2013-02-25 06:42 PST, Alexei Filippov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei Filippov 2013-02-21 06:58:17 PST
To reproduce collect several CPU profiles with the same name, e.g.:
console.profile("alph");
console.profileEnd("alph");
console.profile("alph");
console.profileEnd("alph");

and try to remove these profiles one-by-one from UI. An exception is raised.
Comment 1 Alexei Filippov 2013-02-21 08:15:47 PST
Created attachment 189533 [details]
Patch
Comment 2 Yury Semikhatsky 2013-02-22 00:19:36 PST
Comment on attachment 189533 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=189533&action=review

> Source/WebCore/inspector/front-end/ProfilesPanel.js:559
> +        if (!WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(profile.title) && !profile.isTemporary) {

Why do we skip temporary profiles?

> LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html:18
> +    InspectorTest.runProfilerTestSuite([

You don't need the suite since there is only one test.

> LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html:24
> +                    profiles._removeProfileHeader(profiles._profiles[0]);

Can you check that the group and all profiles are actually removed from the profiles panel sidebar?
Comment 3 Alexei Filippov 2013-02-22 01:52:52 PST
Created attachment 189719 [details]
Patch
Comment 4 Alexei Filippov 2013-02-22 01:57:15 PST
Comment on attachment 189533 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=189533&action=review

>> Source/WebCore/inspector/front-end/ProfilesPanel.js:559
>> +        if (!WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(profile.title) && !profile.isTemporary) {
> 
> Why do we skip temporary profiles?

I don't want'em to form groups.

>> LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html:18
>> +    InspectorTest.runProfilerTestSuite([
> 
> You don't need the suite since there is only one test.

I made it consistent to other tests, e.g. cpu-profiler-profiling.html
Well, removed the suite usage.

>> LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html:24
>> +                    profiles._removeProfileHeader(profiles._profiles[0]);
> 
> Can you check that the group and all profiles are actually removed from the profiles panel sidebar?

_profiles should be empty because of the loop condition. Added a check for _profileGroups.
Comment 5 Yury Semikhatsky 2013-02-22 03:46:31 PST
(In reply to comment #4)
> (From update of attachment 189533 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=189533&action=review
> >> LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html:24
> >> +                    profiles._removeProfileHeader(profiles._profiles[0]);
> > 
> > Can you check that the group and all profiles are actually removed from the profiles panel sidebar?
> 
> _profiles should be empty because of the loop condition. Added a check for _profileGroups.

I meant checking that there are no entries in the sidebar no in the profiles collection.
Comment 6 WebKit Review Bot 2013-02-22 05:57:41 PST
Comment on attachment 189719 [details]
Patch

Rejecting attachment 189719 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=gce-cq-04', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 189719, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:

fatal: read error: Connection reset by peer
Died at Tools/Scripts/update-webkit line 151.

Failed to run "['Tools/Scripts/update-webkit', '--chromium', '--force-update']" exit_code: 2

Updating OpenSource
fatal: read error: Connection reset by peer
Died at Tools/Scripts/update-webkit line 151.

Failed to run "['Tools/Scripts/update-webkit', '--chromium', '--force-update']" exit_code: 2
Updating OpenSource
fatal: read error: Connection reset by peer
Died at Tools/Scripts/update-webkit line 151.

Full output: http://queues.webkit.org/results/16694853
Comment 7 Alexei Filippov 2013-02-25 06:42:02 PST
Created attachment 190048 [details]
Patch
Comment 8 WebKit Review Bot 2013-02-25 07:24:29 PST
Comment on attachment 190048 [details]
Patch

Clearing flags on attachment: 190048

Committed r143923: <http://trac.webkit.org/changeset/143923>
Comment 9 WebKit Review Bot 2013-02-25 07:24:32 PST
All reviewed patches have been landed.  Closing bug.