RESOLVED FIXED 194911
Add more doesGC() assertions.
https://bugs.webkit.org/show_bug.cgi?id=194911
Summary Add more doesGC() assertions.
Mark Lam
Reported 2019-02-21 12:15:01 PST
Patch coming.
Attachments
proposed patch. (13.63 KB, patch)
2019-02-21 14:17 PST, Mark Lam
saam: review+
proposed patch after applying Saam's and Yusuke's feedback. (17.86 KB, patch)
2019-02-21 17:54 PST, Mark Lam
ysuzuki: review+
Radar WebKit Bug Importer
Comment 1 2019-02-21 12:16:44 PST
Mark Lam
Comment 2 2019-02-21 14:17:57 PST
Created attachment 362645 [details] proposed patch.
Saam Barati
Comment 3 2019-02-21 14:24:31 PST
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
Mark Lam
Comment 4 2019-02-21 16:12:15 PST
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).
Mark Lam
Comment 5 2019-02-21 17:54:00 PST
Created attachment 362679 [details] proposed patch after applying Saam's and Yusuke's feedback.
Yusuke Suzuki
Comment 6 2019-02-21 17:58:16 PST
Comment on attachment 362679 [details] proposed patch after applying Saam's and Yusuke's feedback. r=me
Mark Lam
Comment 7 2019-02-21 18:03:25 PST
Thanks for the reviews. Landed in r241927: <http://trac.webkit.org/r241927>.
Note You need to log in before you can comment on or make changes to this bug.