Title: [163672] trunk/Source/_javascript_Core
Revision
163672
Author
mark....@apple.com
Date
2014-02-07 18:01:22 -0800 (Fri, 07 Feb 2014)

Log Message

iOS port needs to clear VM::stackPointerAtVMEntry when it drops locks.
<https://webkit.org/b/128424>

Reviewed by Geoffrey Garen.

The iOS code path for dropping locks differ from the non-iOS code path
in that it (iOS) does not clear m_vm->stackPointerAtVMEntry nor reset the
VM stack limit. This is now fixed by copying that snippit from
JSLock::unlock().

* runtime/JSLock.cpp:
(JSC::JSLock::dropAllLocks):
(JSC::JSLock::dropAllLocksUnconditionally):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (163671 => 163672)


--- trunk/Source/_javascript_Core/ChangeLog	2014-02-08 01:57:02 UTC (rev 163671)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-02-08 02:01:22 UTC (rev 163672)
@@ -1,5 +1,21 @@
 2014-02-07  Mark Lam  <mark....@apple.com>
 
+        iOS port needs to clear VM::stackPointerAtVMEntry when it drops locks.
+        <https://webkit.org/b/128424>
+
+        Reviewed by Geoffrey Garen.
+
+        The iOS code path for dropping locks differ from the non-iOS code path
+        in that it (iOS) does not clear m_vm->stackPointerAtVMEntry nor reset the
+        VM stack limit. This is now fixed by copying that snippit from
+        JSLock::unlock().
+
+        * runtime/JSLock.cpp:
+        (JSC::JSLock::dropAllLocks):
+        (JSC::JSLock::dropAllLocksUnconditionally):
+
+2014-02-07  Mark Lam  <mark....@apple.com>
+
         Removed superflous JSLock::entryStackPointer field.
         <https://webkit.org/b/128413>
 

Modified: trunk/Source/_javascript_Core/runtime/JSLock.cpp (163671 => 163672)


--- trunk/Source/_javascript_Core/runtime/JSLock.cpp	2014-02-08 01:57:02 UTC (rev 163671)
+++ trunk/Source/_javascript_Core/runtime/JSLock.cpp	2014-02-08 02:01:22 UTC (rev 163672)
@@ -225,6 +225,10 @@
     // m_lockDropDepth is only incremented if any locks were dropped.
     ++m_lockDropDepth;
     m_lockCount = 0;
+    if (m_vm) {
+        m_vm->stackPointerAtVMEntry = nullptr;
+        m_vm->updateStackLimitWithReservedZoneSize(wtfThreadData().savedReservedZoneSize());
+    }
     m_lock.unlock();
     return lockCount;
 #else
@@ -248,6 +252,10 @@
     // m_lockDropDepth is only incremented if any locks were dropped.
     ++m_lockDropDepth;
     m_lockCount = 0;
+    if (m_vm) {
+        m_vm->stackPointerAtVMEntry = nullptr;
+        m_vm->updateStackLimitWithReservedZoneSize(wtfThreadData().savedReservedZoneSize());
+    }
     m_lock.unlock();
     return lockCount;
 #else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to