[Webkit-unassigned] [Bug 18725] Make postMessage asynchronous

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 6 14:21:01 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=18725


collinj-webkit at collinjackson.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20978|0                           |1
        is obsolete|                            |




------- Comment #10 from collinj-webkit at collinjackson.com  2008-05-06 14:21 PDT -------
Created an attachment (id=20989)
 --> (http://bugs.webkit.org/attachment.cgi?id=20989&action=view)
Updated patch to address Sam's comments

(In reply to comment #9)
> (From update of attachment 20978 [edit])
> I assume this is due to a change in the spec.  Could you note this in the
> changelog.

Yes. I updated the changelog to mention the spec revision.

> -    : Event(messageEvent, true, true)
> +    : Event(messageEvent, false, true)
> I don't think these need to take PassRefPtrs.  You are not transferring
> ownership, you just want the timer to ref the objects.
> +    PostMessageTimer(PassRefPtr<DOMWindow> window, PassRefPtr<MessageEvent>
> event, PassRefPtr<SecurityOrigin> targetOrigin)

Done.

> The leading { should be on its own line.  I am not sure about the 'delete
> this'.  In the DOMWindowTimer case, we have the the postMessageTimerFired
> equivalent in JSDOMWindowBase delete the timer.  I think either is fine though.
> +    virtual void fired() {
> +        m_window->postMessageTimerFired(this);
> +        delete this;
> +    }

Changed.

> I think this would look better on one line.
> +    PostMessageTimer* timer = new PostMessageTimer(
> +            this, new MessageEvent(message, sourceOrigin, source), target);

Done.

> Is the actual security check done in the postMessageTimerFired because of a
> possibility that the document has changed since the timer was fired?

Well, it could have changed since the timer was *scheduled*. I added a comment
to this effect.


-- 
Configure bugmail: http://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