Patch coming.
<rdar://problem/48285723>
Created attachment 362645 [details] proposed patch.
Comment on attachment 362645 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=362645&action=review > Source/JavaScriptCore/ChangeLog:47 > + (JSC::Heap::collectAsync): I wonder if it's correct for this one. > Source/JavaScriptCore/heap/DeferGC.h:49 > + if (m_heap.deferralDepth() == 1) Why would we not always assert this? We generally don't know if we're the outmost or not. > Source/JavaScriptCore/heap/Heap.cpp:1033 > + RELEASE_ASSERT(expectDoesGC()); I wonder if this should be based on synchronousness
Comment on attachment 362645 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=362645&action=review >> Source/JavaScriptCore/ChangeLog:47 >> + (JSC::Heap::collectAsync): > > I wonder if it's correct for this one. collectAsync can GC synchronously as well because: - collectAsync() calls requestCollection() - requestCollection() calls stopIfNecessary() - stopIfNecessary() can calls collectInMutatorThread(). >> Source/JavaScriptCore/heap/DeferGC.h:49 >> + if (m_heap.deferralDepth() == 1) > > Why would we not always assert this? We generally don't know if we're the outmost or not. You're right. This check is not needed. I'll make the assertion unconditional. >> Source/JavaScriptCore/heap/Heap.cpp:1033 >> + RELEASE_ASSERT(expectDoesGC()); > > I wonder if this should be based on synchronousness Async can GC in mutator thread as well (as explained above).
Created attachment 362679 [details] proposed patch after applying Saam's and Yusuke's feedback.
Comment on attachment 362679 [details] proposed patch after applying Saam's and Yusuke's feedback. r=me
Thanks for the reviews. Landed in r241927: <http://trac.webkit.org/r241927>.