[webkit-reviews] review granted: [Bug 110597] Web Inspector: move profile type specific code out of ProfilesPanel (refactor) : [Attachment 189759] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 22 07:57:43 PST 2013


Yury Semikhatsky <yurys at chromium.org> has granted Alexei Filippov
<alph at chromium.org>'s request for review:
Bug 110597: Web Inspector: move profile type specific code out of ProfilesPanel
(refactor)
https://bugs.webkit.org/show_bug.cgi?id=110597

Attachment 189759: Patch
https://bugs.webkit.org/attachment.cgi?id=189759&action=review

------- Additional Comments from Yury Semikhatsky <yurys at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=189759&action=review


> Source/WebCore/inspector/front-end/CPUProfileView.js:678
> +	   WebInspector.ProfileType.prototype.removeProfile.call(this,
profile);

Do you really need this call of super class?

> Source/WebCore/inspector/front-end/CSSSelectorProfileView.js:-330
> -	  
profilesPanel.setRecordingProfile(WebInspector.CSSSelectorProfileType.TypeId,
true);

Where is it called now?

> Source/WebCore/inspector/front-end/CSSSelectorProfileView.js:-351
> -	      
profilesPanel.setRecordingProfile(WebInspector.CSSSelectorProfileType.TypeId,
false);

Who notifies the panel about recording state change?

> Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js:356
> +    {

What if there is no temp profile?

> Source/WebCore/inspector/front-end/ProfilesPanel.js:94
> +    get profiles()

Please use function instead of getter.

> Source/WebCore/inspector/front-end/ProfilesPanel.js:484
> +	   console.trace();

Remove this.

> Source/WebCore/inspector/front-end/ProfilesPanel.js:577
> +	  
profileType.addEventListener(WebInspector.ProfileType.Events.AddProfileHeader,
(function(event) { this._addProfileHeader(event.data); }).bind(this));

Please use a method instead of anonymous function.

> Source/WebCore/inspector/front-end/ProfilesPanel.js:988
> +	   return this._getProfileTypesArray().reduce(function(result, type) {
return result.concat(type.profiles); }, []);

Maybe extract anonymous function and give it a name?

> Source/WebCore/inspector/front-end/ProfilesPanel.js:995
> +	   const visibleView = this.visibleView;

I'd rather use a plain old loop.

> Source/WebCore/inspector/front-end/ProfilesPanel.js:-1001
> -	   for (var i = 0; i < this._profiles.length; ++i) {

Revert this?

> Source/WebCore/inspector/front-end/ProfilesPanel.js:-1148
> -	   this._launcherView.profileStarted();

Now that this code is removed, how does the launcher view know that profiling
has started?


More information about the webkit-reviews mailing list