Clearing strong references would lower the chances to get stuck in a retain cycle.
Created attachment 254566 [details] Patch
Comment on attachment 254566 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254566&action=review > Source/WebCore/ChangeLog:12 > + Removed DeferredWrapper constructor that creates internally its promise. > + Reason is DeferredWrapper should be moved and we would loose access to its promise. I don’t understand this. I don’t see DeferredWrapper being moved! It seems to be captured by lambda, which makes copies and doesn’t move. Is this a statement of future intent? > Source/WebCore/bindings/js/JSDOMPromise.cpp:43 > + // FIXME: Remove this accessor once ReadableStreamReader custom binding do not need it. Grammar mistake: should be "does not need it". > Source/WebCore/bindings/js/JSDOMPromise.h:62 > + ASSERT(m_deferred && m_globalObject); A rule of thumb in WebKit is that we never use && in the top level expression in an ASSERT, because we’d like to know which clause failed. So this should be written in two lines: ASSERT(m_deferred); ASSERT(m_globalObject);
Comment on attachment 254566 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254566&action=review >> Source/WebCore/ChangeLog:12 >> + Reason is DeferredWrapper should be moved and we would loose access to its promise. > > I don’t understand this. I don’t see DeferredWrapper being moved! It seems to be captured by lambda, which makes copies and doesn’t move. Is this a statement of future intent? The log states 'DeferredWrapper should be moved', not that it is actually moved. This migration is done in bug 145223 patch for AudioPromise, Once all promise binding code is moved to direct use of DOMPromise/DeferredWrapper, promise() accessor and copy constructors of DeferredWrapper could be also removed. I will clarify this in a new version of the patch. >> Source/WebCore/bindings/js/JSDOMPromise.cpp:43 >> + // FIXME: Remove this accessor once ReadableStreamReader custom binding do not need it. > > Grammar mistake: should be "does not need it". I thought I fixed it... Will do in next patch. >> Source/WebCore/bindings/js/JSDOMPromise.h:62 >> + ASSERT(m_deferred && m_globalObject); > > A rule of thumb in WebKit is that we never use && in the top level expression in an ASSERT, because we’d like to know which clause failed. So this should be written in two lines: > > ASSERT(m_deferred); > ASSERT(m_globalObject); OK
Created attachment 254589 [details] Fixed according review
Comment on attachment 254589 [details] Fixed according review View in context: https://bugs.webkit.org/attachment.cgi?id=254589&action=review > Source/WebCore/bindings/js/JSDOMPromise.h:84 > + ASSERT(m_deferred && m_globalObject); Oops, left this one in by accident.
Created attachment 254594 [details] Removed redundant assert
Comment on attachment 254594 [details] Removed redundant assert Attachment 254594 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5766373422661632 New failing tests: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
Created attachment 254607 [details] Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Comment on attachment 254594 [details] Removed redundant assert Let's try cq+. The failing test might be unrelated.
Comment on attachment 254594 [details] Removed redundant assert Clearing flags on attachment: 254594 Committed r185404: <http://trac.webkit.org/changeset/185404>
All reviewed patches have been landed. Closing bug.