Bug 31921 - Use ProgressTracker from the inspected page to generate ids for cached resources
Summary: Use ProgressTracker from the inspected page to generate ids for cached resources
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: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 13:49 PST by Yury Semikhatsky
Modified: 2009-11-27 04:46 PST (History)
2 users (show)

See Also:


Attachments
patch (7.25 KB, patch)
2009-11-26 14:00 PST, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
patch (20.65 KB, patch)
2009-11-27 00:43 PST, Yury Semikhatsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2009-11-26 13:49:51 PST
Instead of generating negative identifiers for cached resources in InspectorController and extending identifier type from 'unsigned long' to 'long long' it would be better to reuse progress tracker for the inspected page to generate those identifiers. It would guarantee that InspectorResources' ids are unique.
Comment 1 Yury Semikhatsky 2009-11-26 14:00:06 PST
Created attachment 43932 [details]
patch
Comment 2 Yury Semikhatsky 2009-11-27 00:43:05 PST
Created attachment 43937 [details]
patch
Comment 3 Pavel Feldman 2009-11-27 01:36:40 PST
Comment on attachment 43937 [details]
patch

I don't think we need to add methods for setting various integers - we don't even use existing ones. Can we optimize it in a way that there are only methods for signed, unsigned and floating point? That API would be easier to maintain and there will not be that much copy-paste in the code.
Comment 4 Yury Semikhatsky 2009-11-27 02:36:56 PST
(In reply to comment #3)
> (From update of attachment 43937 [details])
> I don't think we need to add methods for setting various integers - we don't
> even use existing ones. Can we optimize it in a way that there are only methods
> for signed, unsigned and floating point? That API would be easier to maintain
> and there will not be that much copy-paste in the code.

We cannot reduce the number of overloaded methods without introducing lots of static_casts because if we had just double and bool there would be ambiguity for ints if we had double, bool and int there is ambiguity for long and so on.
Comment 5 Yury Semikhatsky 2009-11-27 03:13:21 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/bindings/js/ScriptFunctionCall.cpp
	M	WebCore/bindings/js/ScriptFunctionCall.h
	M	WebCore/bindings/js/ScriptObject.cpp
	M	WebCore/bindings/js/ScriptObject.h
	M	WebCore/bindings/v8/ScriptFunctionCall.cpp
	M	WebCore/bindings/v8/ScriptFunctionCall.h
	M	WebCore/bindings/v8/ScriptObject.cpp
	M	WebCore/bindings/v8/ScriptObject.h
	M	WebCore/inspector/InspectorBackend.cpp
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/InspectorController.h
	M	WebCore/inspector/InspectorDOMAgent.cpp
	M	WebCore/inspector/InspectorFrontend.cpp
	M	WebCore/inspector/InspectorFrontend.h
	M	WebCore/inspector/InspectorResource.cpp
	M	WebCore/inspector/InspectorResource.h
	M	WebCore/inspector/TimelineRecordFactory.cpp
Committed r51439