[Webkit-unassigned] [Bug 45286] Web Inspector: use string representation of resource type in extension API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 9 06:45:19 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=45286





--- Comment #7 from Andrey Kosyakov <caseq at chromium.org>  2010-09-09 06:45:19 PST ---
(In reply to comment #5)
> (From update of attachment 66712 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=66712&action=prettypatch
> 
> > LayoutTests/inspector/extensions-resources.html:47
> > +    webInspector.inspectedWindow.evaluate("var xhr = new XMLHttpRequest(); xhr.open('GET', '" + location.href + "', false); xhr.send(null);", callback);
> This code can be extracted into a function on the inspected side and then you would only need to call that function. I guess it might make the code more clear.

Done.

> 
> > WebCore/inspector/front-end/ExtensionAPI.js:134
> > +var ResourceTypes = {
> Could we extract this into a file shared between ExtensionAPI.js and Resource.js, r- for this.

Done this as well, though I'm still not sure it's really better: the idea we duplicate resource type ids in the API is that those are actually our external interface and should remain same even if internal representation is changed. The automatic generation of ResourceTypes is more obscure, will work well as long as we only adding new resource type and will have to be rewritten if we ever rename a resource type.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list