Changeset 163672 in webkit


Ignore:
Timestamp:
Feb 7, 2014 6:01:22 PM (10 years ago)
Author:
mark.lam@apple.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r163665 r163672  
     12014-02-07  Mark Lam  <mark.lam@apple.com>
     2
     3        iOS port needs to clear VM::stackPointerAtVMEntry when it drops locks.
     4        <https://webkit.org/b/128424>
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        The iOS code path for dropping locks differ from the non-iOS code path
     9        in that it (iOS) does not clear m_vm->stackPointerAtVMEntry nor reset the
     10        VM stack limit. This is now fixed by copying that snippit from
     11        JSLock::unlock().
     12
     13        * runtime/JSLock.cpp:
     14        (JSC::JSLock::dropAllLocks):
     15        (JSC::JSLock::dropAllLocksUnconditionally):
     16
    1172014-02-07  Mark Lam  <mark.lam@apple.com>
    218
  • trunk/Source/JavaScriptCore/runtime/JSLock.cpp

    r163665 r163672  
    226226    ++m_lockDropDepth;
    227227    m_lockCount = 0;
     228    if (m_vm) {
     229        m_vm->stackPointerAtVMEntry = nullptr;
     230        m_vm->updateStackLimitWithReservedZoneSize(wtfThreadData().savedReservedZoneSize());
     231    }
    228232    m_lock.unlock();
    229233    return lockCount;
     
    249253    ++m_lockDropDepth;
    250254    m_lockCount = 0;
     255    if (m_vm) {
     256        m_vm->stackPointerAtVMEntry = nullptr;
     257        m_vm->updateStackLimitWithReservedZoneSize(wtfThreadData().savedReservedZoneSize());
     258    }
    251259    m_lock.unlock();
    252260    return lockCount;
Note: See TracChangeset for help on using the changeset viewer.