Upstream iOS isWebThread() and isUIThread()
https://bugs.webkit.org/show_bug.cgi?id=109130

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-02-07
Reviewed by Sam Weinig.

Source/WebCore: 

* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject initialize]):
* platform/mac/SharedBufferMac.mm:
(+[WebCoreSharedBufferData initialize]):
#ifdef out the legacy initialization as it is not correct when
using a WebThread.

Source/WTF: 

On iOS, it is sometimes necessary to differenciate the thread running WebCore,
and the thread running the UI. This patch upstream those functions.

* wtf/MainThread.cpp:
* wtf/MainThread.h:
Disable the legacy initializer as it is incorrect when using the WebThread to run WebCore.
(WTF::isWebThread):
(WTF::isUIThread):
Return true when the current thread is the Web/UI thread.

* wtf/mac/MainThreadMac.mm:
(WTF::isUIThread):
(WTF::isWebThread):

* wtf/text/AtomicString.cpp:
(WTF::AtomicStringTable::create):
Use the newly added methods.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142163 268f45cc-cd09-0410-ab3c-d52691b4dbfc