[Webkit-unassigned] [Bug 26041] Allow adding resource source to frame asynchronously

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 27 09:15:46 PDT 2009


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


yurys at chromium.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothy at hatcher.name




------- Comment #2 from yurys at chromium.org  2009-05-27 09:15 PDT -------
(In reply to comment #1)
> Created an attachment (id=30709)
 --> (https://bugs.webkit.org/attachment.cgi?id=30709&action=view) [review]
> Change addResourceSourceToFrame so that it invokes callback when the source is
> loaded.
> 

The patch changes WebInspector front-end so that it expects
InspectorController.addResourceSourceToFrame to add the script source
asynchronously. When the source is loaded the front-end is notified by call to
InspectorFrontend::didAddResourceSourceToFrame which will execute
SourceView.addResourceSourceToFrameCallback for the resource to run all delayed
actions including syntax highlight, reveal and highlight line. 

Custom implementations of addSourceToFrame and addResourceSourceToFrame can now
be merged into a common one. 

There is an issue with resource identifier passed as long value to
InspectorController.addResourceSourceToFrame.  A short introduction: all
resources loaded not from cache will have identifiers of type 'unsigned long'.
Resources loaded from memory cache will have no identifiers. To work with both
types of resources uniformly InspecorController.didLoadResourceFromMemoryCache
assigns some surrogate identifiers to the cached resources. The identifiers are
always negative to guarantee that they don't clash with existing ones. To fit
both types of identifiers InspectorResource.m_identifier has type 'long long'.
However JavaScript Number cannot fit all 'long long' values that is why in
InspectorController.idl I couldn't declare  addResourceSourceToFrame as
accepting 'long long indetifier'. 'double' type would be big enough to fit all
the values but it looks ugly when an argument with name 'identifier' has
'double' type. In C++ code it can be mitigated by using 'typdef double
ResourceId' but we would still need to decalre it as double in the .idl  In the
current version the ids are passed as 'long' to the javascript code which may
lead to loss of accuracy. Any thoughts on that?


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



More information about the webkit-unassigned mailing list