[webkit-reviews] review denied: [Bug 80863] Web Inspector: Add snippets model. : [Attachment 131389] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 13 01:56:32 PDT 2012


Yury Semikhatsky <yurys at chromium.org> has denied Vsevolod Vlasov
<vsevik at chromium.org>'s request for review:
Bug 80863: Web Inspector: Add snippets model.
https://bugs.webkit.org/show_bug.cgi?id=80863

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

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


> Source/WebCore/inspector/front-end/SnippetsModel.js:2
> + * Copyright (C) 2011 Google Inc. All rights reserved.

2012

> Source/WebCore/inspector/front-end/SnippetsModel.js:35
> +    this._snippetsCount = 0;

It is unused, remove it.

> Source/WebCore/inspector/front-end/SnippetsModel.js:63
> +	       savedSnippet.id = this._snippets[i].id;

Can we generate snippet id on load?

> Source/WebCore/inspector/front-end/SnippetsModel.js:102
> +	   var snippet = new WebInspector.Snippet(this, this._snippets.length);


Using this._snippets.length as snippet id is fragile. Please use a separate
counter for it as discussed offline.

> Source/WebCore/inspector/front-end/SnippetsModel.js:139
> +    snippetForId: function(snippetId)

This will break if one of the snippets has been deleted. Please fix.


More information about the webkit-reviews mailing list