Bug 64287 - Web Inspector: Network panel search needs each resource to have unique identifier.
Summary: Web Inspector: Network panel search needs each resource to have unique identi...
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: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 09:18 PDT by Vsevolod Vlasov
Modified: 2011-07-13 07:02 PDT (History)
11 users (show)

See Also:


Attachments
Patch (6.45 KB, patch)
2011-07-11 09:23 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch with fixes (6.40 KB, patch)
2011-07-12 06:10 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch with fixes2 (6.38 KB, patch)
2011-07-12 06:30 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Vlasov 2011-07-11 09:18:38 PDT
Network panel search needs each resource to have unique identifier.
Comment 1 Vsevolod Vlasov 2011-07-11 09:23:43 PDT
Created attachment 100310 [details]
Patch
Comment 2 Ilya Tikhonovsky 2011-07-12 05:08:22 PDT
Comment on attachment 100310 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:1158
> +        if (this._matchedResourcesMap[resource.identifier]) {
> +            this._matchedResourcesMap[oldResource.identifier] = this._matchedResourcesMap[resource.identifier];
> +            delete this._matchedResourcesMap[resource.identifier];
> +        }
> +        for (var i = 0; i < this._matchedResources.length; i++) {
> +            if (this._matchedResources[i] === resource.identifier)
> +                this._matchedResources[i] = oldResource.identifier;
> +        }

As far as the value in this._matchedResourcesMap[resource.identifier] is the index of resource in this._matchedResources
you can use it instead of iterating over this._matchedResources array.
Comment 3 Vsevolod Vlasov 2011-07-12 06:10:03 PDT
Created attachment 100474 [details]
Patch with fixes
Comment 4 Vsevolod Vlasov 2011-07-12 06:30:08 PDT
Created attachment 100477 [details]
Patch with fixes2
Comment 5 WebKit Review Bot 2011-07-13 07:02:40 PDT
Comment on attachment 100477 [details]
Patch with fixes2

Clearing flags on attachment: 100477

Committed r90913: <http://trac.webkit.org/changeset/90913>
Comment 6 WebKit Review Bot 2011-07-13 07:02:44 PDT
All reviewed patches have been landed.  Closing bug.