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