Ignore:
Timestamp:
Jan 31, 2018, 10:57:13 AM (8 years ago)
Author:
[email protected]
Message:

Canonicalize aquiring the JSCell lock.
https://bugs.webkit.org/show_bug.cgi?id=182320

Reviewed by Michael Saboff.

It's currently kinda annoying to figure out where
we aquire the a JSCell's lock. This patch adds a
helper to make it easier to grep...

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::visitChildren):
(JSC::UnlinkedCodeBlock::setInstructions):
(JSC::UnlinkedCodeBlock::shrinkToFit):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::finishCreation):
(JSC::ErrorInstance::materializeErrorInfoIfNeeded):
(JSC::ErrorInstance::visitChildren):

  • runtime/JSArray.cpp:

(JSC::JSArray::shiftCountWithArrayStorage):
(JSC::JSArray::unshiftCountWithArrayStorage):

  • runtime/JSCell.h:

(JSC::JSCell::cellLock):

  • runtime/JSObject.cpp:

(JSC::JSObject::visitButterflyImpl):
(JSC::JSObject::convertContiguousToArrayStorage):

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::visitChildren):

  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayValueMap::add):
(JSC::SparseArrayValueMap::remove):
(JSC::SparseArrayValueMap::visitChildren):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSArray.cpp

    r227617 r227906  
    803803   
    804804    DisallowGC disallowGC;
    805     auto locker = holdLock(*this);
     805    auto locker = holdLock(cellLock());
    806806   
    807807    if (startIndex + count > vectorLength)
     
    10061006    // a weird state: some parts of it will be left uninitialized, which we will fill in here.
    10071007    DeferGC deferGC(vm.heap);
    1008     auto locker = holdLock(*this);
     1008    auto locker = holdLock(cellLock());
    10091009   
    10101010    if (moveFront && storage->m_indexBias >= count) {
Note: See TracChangeset for help on using the changeset viewer.