REGRESSION (r137607): Loading of archives as substitute data is broken
https://bugs.webkit.org/show_bug.cgi?id=108589

Reviewed by Alexey Proskuryakov.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::resourceData): Return the content from
    SubstituteData as mainResourceData if present.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Upstream iOS's AtomicString
https://bugs.webkit.org/show_bug.cgi?id=108139

Reviewed by David Kilzer.

On iOS, WebCore can be executed from two different threads. To maintain consistency,
a few changes had been made:
-The main UI thread and the WebThread share the same AtomicStringTable.
-A spin lock is needed before any access to prevent any concurrent modification of the string table.
 The spin lock also prevent race on the static initialization of the shared table.

* wtf/Platform.h:
Introduce a new USE(WEB_THREAD) to scope changes related to iOS Web Thread.
* wtf/text/AtomicString.cpp:
(AtomicStringTableLocker):
(WTF::AtomicStringTableLocker::AtomicStringTableLocker):
(WTF::AtomicStringTableLocker::~AtomicStringTableLocker):
(WTF::AtomicStringTable::create):
wtfThreadData() is not necessarily inlined on ARM. When it is not inlined, the old code
causes two call to the function. Instead, we can keep the value in register and pass it
to AtomicStringTable::create().
(WTF::stringTable):
(WTF::addToStringTable):
(WTF::AtomicString::addSlowCase):
(WTF::AtomicString::find):
(WTF::AtomicString::remove):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/12884778> Sandbox violation due to MediaAccessibility code trying to access ~/Library/Preferences/com.apple.mediaaccessibility.plist

        Reviewed by Sam Weinig.

        * WebProcess/com.apple.WebProcess.sb.in:



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