Source/JavaScriptCore: Removing limitation on JSLock's lockDropDepth.
<https://webkit.org/b/128570>

Reviewed by Geoffrey Garen.

Now that we've switched to using the C stack, we no longer need to limit
the JSLock::lockDropDepth to 2.

For C loop builds which still use the separate JSStack, the JSLock will
enforce ordering for re-grabbing the lock after dropping it. Re-grabbing
must occur in the reverse order of the dropping of the locks.

Ordering is achieved by JSLock::dropAllLocks() stashing away the
JSLock:: m_lockDropDepth in its DropAllLocks instance's m_dropDepth
before unlocking the lock. Subsequently, JSLock::grabAllLocks() will
ensure that JSLocks::m_lockDropDepth equals its DropAllLocks instance's
m_dropDepth before allowing the lock to be re-grabbed. Otherwise, it
will yield execution and retry again later.

Note: because JSLocks::m_lockDropDepth is protected by the JSLock's
mutex, grabAllLocks() will optimistically lock the JSLock before doing
the check on m_lockDropDepth. If the check fails, it will unlock the
JSLock, yield, and then relock it again later before retrying the check.
This ensures that m_lockDropDepth remains under the protection of the
JSLock's mutex.

* runtime/JSLock.cpp:
(JSC::JSLock::dropAllLocks):
(JSC::JSLock::grabAllLocks):
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/JSLock.h:
(JSC::JSLock::DropAllLocks::setDropDepth):
(JSC::JSLock::DropAllLocks::dropDepth):

Source/WebCore: Removing limitation on JSLock’s lockDropDepth.
<https://webkit.org/b/128570>

Reviewed by Geoffrey Garen.

No new tests.

* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
* platform/ios/wak/WebCoreThread.mm:
(SendDelegateMessage):
(WebThreadRunOnMainThread):
- No longer need to specify AlwaysDropLocks, because DropAllLocks is
  now always unconditional.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the iOS build after r163848

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-10

* UIProcess/ios/TextCheckerIOS.mm:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::checkSpellingOfString):
(WebKit::TextChecker::checkGrammarOfString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html fails
<rdar://problem/16033286> and https://bugs.webkit.org/show_bug.cgi?id=128574

Reviewed by Maciej Stachowiak.

Source/WebKit2:

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore): If there is no value in an object-store get,
  don’t return *any* results.

LayoutTests:

* platform/mac-wk2/TestExpectations:  Add the test (still skipped for now due to unrelated reasons).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support ANGLE_instanced_arrays for linux
https://bugs.webkit.org/show_bug.cgi?id=127465

Reviewed by Martin Robinson.

Support the instanced drawing WebGL extension, ANGLE_instanced_arrays for linux platform.
This is a following patch for r162565. Relevant opengl APIs are exposed
for WebGLRenderingContext to access them.

Covered by fast/canvas/webgl/angle-instanced-arrays.html

* html/canvas/ANGLEInstancedArrays.cpp:
(WebCore::ANGLEInstancedArrays::supported):
* platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
* platform/graphics/OpenGLShims.h:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::drawArraysInstanced):
(WebCore::GraphicsContext3D::drawElementsInstanced):
(WebCore::GraphicsContext3D::vertexAttribDivisor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-enable ARM Thumb2 disassembler
https://bugs.webkit.org/show_bug.cgi?id=128577

Reviewed by Filip Pizlo.

Source/JavaScriptCore: 

Changed signature of tryToDisassemble() to match updates.
Fixed typo in disassembler.

* disassembler/ARMv7/ARMv7DOpcode.cpp:
* disassembler/ARMv7Disassembler.cpp:
(JSC::tryToDisassemble):

Source/WTF: 

Added definition of WTF_USE_ARMV7_DISASSEMBLER back to Platform.h

* wtf/Platform.h:


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