Changeset 279689 in webkit


Ignore:
Timestamp:
Jul 7, 2021 5:53:54 PM (3 years ago)
Author:
mark.lam@apple.com
Message:

Heap::waitForCollector() needs to set m_mutatorDidRun.
https://bugs.webkit.org/show_bug.cgi?id=227782
rdar://78326474

Reviewed by Saam Barati.

Heap::waitForCollector() is one of 2 clients of Heap::stopIfNecessarySlow(unsigned oldState).
The other client, Heap::stopIfNecessarySlow() sets m_mutatorDidRun to true after
calling Heap::stopIfNecessarySlow(unsigned oldState). Heap::waitForCollector()
needs to do the same. Constraint solvers rely on this.

Without this, one fall out we've seen is that DOMGCOutputConstraint fails to
visitOutputConstraints, and as a result, opaqueRoots may not get updated. This
issue was caught by the GC verifier.

  • heap/Heap.cpp:

(JSC::Heap::waitForCollector):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r279677 r279689  
     12021-07-07  Mark Lam  <mark.lam@apple.com>
     2
     3        Heap::waitForCollector() needs to set m_mutatorDidRun.
     4        https://bugs.webkit.org/show_bug.cgi?id=227782
     5        rdar://78326474
     6
     7        Reviewed by Saam Barati.
     8
     9        Heap::waitForCollector() is one of 2 clients of Heap::stopIfNecessarySlow(unsigned oldState).
     10        The other client, Heap::stopIfNecessarySlow() sets m_mutatorDidRun to true after
     11        calling Heap::stopIfNecessarySlow(unsigned oldState).  Heap::waitForCollector()
     12        needs to do the same.  Constraint solvers rely on this.
     13
     14        Without this, one fall out we've seen is that DOMGCOutputConstraint fails to
     15        visitOutputConstraints, and as a result, opaqueRoots may not get updated.  This
     16        issue was caught by the GC verifier.
     17
     18        * heap/Heap.cpp:
     19        (JSC::Heap::waitForCollector):
     20
    1212021-07-07  Michael Saboff  <msaboff@apple.com>
    222
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r279654 r279689  
    18831883            continue;
    18841884       
     1885        m_mutatorDidRun = true;
    18851886        // FIXME: We wouldn't need this if stopIfNecessarySlow() had a mode where it knew to just
    18861887        // do the collection.
    18871888        relinquishConn();
    1888        
     1889
    18891890        if (done) {
    18901891            clearMutatorWaiting(); // Clean up just in case.
Note: See TracChangeset for help on using the changeset viewer.