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)
commit253e3b2b58263c5da79a62f4c726d407294c06f4
tree656e629b65f445c14373c76a1306d4d073f93b86
parent01cf13c596858d9fe63dc9ee8f3f854c47ea2b72
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: http://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