[Webkit-unassigned] [Bug 31080] WebInspector: Handle turning TimelineAgent on/off in the middle of an event dispatch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 3 13:43:54 PST 2009


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


Pavel Feldman <pfeldman at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #42413|review?                     |review-
               Flag|                            |




--- Comment #3 from Pavel Feldman <pfeldman at chromium.org>  2009-11-03 13:43:54 PDT ---
(From update of attachment 42413)
Please refer to a bug from the ChangeLog (s)!


> -            type == eventNames().clickEvent || type == eventNames().mousedownEvent ||
> -            type == eventNames().mouseupEvent || type == eventNames().dblclickEvent ||
> +            type == eventNames().clickEvent || type == eventNames().mousedownEvent 
> +            || type == eventNames().mouseupEvent || type == eventNames().dblclickEvent 
>              // keyboard events
> -            type == eventNames().keydownEvent || type == eventNames().keypressEvent ||
> -            type == eventNames().keyupEvent ||
> +            || type == eventNames().keydownEvent || type == eventNames().keypressEvent
> +            || type == eventNames().keyupEvent
>              // other accepted events
> -            type == eventNames().selectEvent || type == eventNames().changeEvent ||
> -            type == eventNames().focusEvent || type == eventNames().blurEvent ||
> -            type == eventNames().submitEvent)
> +            || type == eventNames().selectEvent || type == eventNames().changeEvent
> +            || type == eventNames().focusEvent || type == eventNames().blurEvent
> +            || type == eventNames().submitEvent)
>              return true;

Nothing changed, right?

> +    // An empty stack could merely mean that the timeline agent was turned on in the middle of
> +    // an event.  Don't treat as an error.

We are now forgiving too much and it could be error-prone. I think it is Ok for
now though.

> +    if (!m_recordStack.isEmpty()) {
> +        TimelineRecordEntry entry = m_recordStack.last();
> +        m_recordStack.removeLast();
> +        ASSERT(entry.type == type);

There is no guarantee that the top of the stack is the matching event, is
there?
Counter and a map would save the world, but will make things more complex.
Returning timelineagent "version" from will* methods and passing it back to
did* method would be Ok.

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