Add threading assertion to WeakPtr's operator->().
Created attachment 374424 [details] WIP Patch
Attachment 374424 [details] did not pass style-queue: ERROR: Source/WTF/wtf/WeakPtr.h:75: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:77: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:83: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:85: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 4 in 1 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 374424 [details] WIP Patch Attachment 374424 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/12769328 Number of test failures exceeded the failure limit.
Created attachment 374432 [details] Archive of layout-test-results from ews104 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Created attachment 375135 [details] Patch
Attachment 375135 [details] did not pass style-queue: ERROR: Source/WTF/wtf/WeakPtr.h:75: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:77: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:83: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:85: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 4 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 375135 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375135&action=review > Source/WTF/wtf/WeakPtr.h:65 > + RELEASE_ASSERT(Thread::mayBeGCThread() || m_wasConstructedOnMainThread == isMainThread()); I think this needs to be a debug-only behavior. It's pretty expensive to turn every read from a pointer into a read from a thread-specific variable. We want WeakPtr to be "just as fast" as raw pointer, so we never have to have a performance vs security debate when we deploy WeakPtr.
(In reply to Geoffrey Garen from comment #7) > Comment on attachment 375135 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=375135&action=review > > > Source/WTF/wtf/WeakPtr.h:65 > > + RELEASE_ASSERT(Thread::mayBeGCThread() || m_wasConstructedOnMainThread == isMainThread()); > > I think this needs to be a debug-only behavior. It's pretty expensive to > turn every read from a pointer into a read from a thread-specific variable. > We want WeakPtr to be "just as fast" as raw pointer, so we never have to > have a performance vs security debate when we deploy WeakPtr. Well, obviously :) This is merely using RELEASE_ASSERT() so that EWS can catch cases that trip this assertion. This patch is NOT up for review :)
Oh, duh :P
Created attachment 375309 [details] Patch
Attachment 375309 [details] did not pass style-queue: ERROR: Source/WTF/wtf/WeakPtr.h:75: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:77: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:83: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/WTF/wtf/WeakPtr.h:85: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 4 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 375312 [details] Patch
Comment on attachment 375312 [details] Patch Patch is ready for review.
Comment on attachment 375312 [details] Patch Clearing flags on attachment: 375312 Committed r248113: <https://trac.webkit.org/changeset/248113>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53825085>