MessagePort must set m_closed to be true at the end of MessagePort::close function
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Apr 2012 01:14:05 +0000 (01:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Apr 2012 01:14:05 +0000 (01:14 +0000)
commit659b94cfe1fe30da4e8a08a39ae5bf26840c5f56
tree656e629b65f445c14373c76a1306d4d073f93b86
parent977767fdc16f4ace31ac2fecc847976fe7b72339
MessagePort must set m_closed to be true at the end of MessagePort::close function
https://bugs.webkit.org/show_bug.cgi?id=85139

Source/WebCore:

In the function MessagePort::close, the "m_closed = true" must be executed at the end, not at the beginning.
Or, the m_entangledChannel->close() will not be executed.
And it resulted in the failure of MS bench mark messagechannel_close.htm.
http://samples.msdn.microsoft.com/ietestcenter/WebWorkers/messagechannel_close.htm

Patch by Li Yin <li.yin@intel.com> on 2012-04-28
Reviewed by Kentaro Hara.

Test: fast/events/message-port-close.html

* dom/MessagePort.cpp:
(WebCore::MessagePort::close):

LayoutTests:

Test MessageChannel.port whether can receive message after it is closed.

Patch by Li Yin <li.yin@intel.com> on 2012-04-28
Reviewed by Kentaro Hara.

* fast/events/message-port-close-expected.txt: Added.
* fast/events/message-port-close.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/message-port-close-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/message-port-close.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/MessagePort.cpp