[Webkit-unassigned] [Bug 26350] Make WebInspector's console evaluation/completion asynchronous.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 13 04:17:30 PDT 2009


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


pfeldman at chromium.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31206|review?                     |
               Flag|                            |
  Attachment #31206|0                           |1
        is obsolete|                            |
  Attachment #31232|                            |review?
               Flag|                            |




------- Comment #3 from pfeldman at chromium.org  2009-06-13 04:17 PDT -------
Created an attachment (id=31232)
 --> (https://bugs.webkit.org/attachment.cgi?id=31232&action=view)
patch

Thanks for the review!

(In reply to comment #2)
> (From update of attachment 31206 [review])
> The code looks correct. I think this just gets ready for asynchronous
> evaluation, but the callback is still called synchronously. Is that correct?
> 

Calls receiving callbacks are always the last ones in the methods, so that it
should not really matter. However you are right - putting these into SetTimeout
would give better guarantees. This is now done.

> Maybe use setTimeout with a zero/quick delay to simulate asynchronous
> behaviour.
> 

Done.

> One concern I have with the completion code being asynchronous is if the user
> keeps typing and the completions for the previous range have not been returned
> yet. When the results are returned to the callback, the user typed text might
> get messed up or mangled in some way.
> 
> So I think completion results need to be ignored if more user typing has
> happened since. Make sense?
> 

I've added post-evaluation filtering into completionReady, so that only the
ones that do match currently added query are suggested.

I've also extracted couple of methods in the code: 
- installation of the console API 
    (just for convenience)
- Console::doEvalInWindow and ScriptsPanel::doEvalInCallFrame 
    (these are supposed to do the actual eval work over the serialization
layer).


-- 
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