Changeset 244352 in webkit
- Timestamp:
- Apr 16, 2019, 12:46:27 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/heap/BlockDirectory.cpp (modified) (1 diff)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/Locker.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r244330 r244352 1 2019-04-16 Robin Morisset <rmorisset@apple.com> 2 3 [WTF] holdLock should be marked WARN_UNUSED_RETURN 4 https://bugs.webkit.org/show_bug.cgi?id=196922 5 6 Reviewed by Keith Miller. 7 8 There was one case where holdLock was used and the result ignored. 9 From a comment that was deleted in https://bugs.webkit.org/attachment.cgi?id=328438&action=prettypatch, I believe that it is on purpose. 10 So I brought back a variant of the comment, and made the ignoring of the return explicit. 11 12 * heap/BlockDirectory.cpp: 13 (JSC::BlockDirectory::isPagedOut): 14 1 15 2019-04-16 Caitlin Potter <caitp@igalia.com> 2 16 -
trunk/Source/JavaScriptCore/heap/BlockDirectory.cpp
r242912 r244352 62 62 unsigned itersSinceLastTimeCheck = 0; 63 63 for (auto* block : m_blocks) { 64 if (block) 65 holdLock(block->block().lock()); 64 if (block) { 65 // We take and drop the lock as a way of touching that page of memory. 66 // FIXME: should we instead do a cheaper thing like a volatile load in the page? 67 (void) holdLock(block->block().lock()); 68 } 66 69 ++itersSinceLastTimeCheck; 67 70 if (itersSinceLastTimeCheck >= Heap::s_timeCheckResolution) { -
trunk/Source/WTF/ChangeLog
r244349 r244352 1 2019-04-16 Robin Morisset <rmorisset@apple.com> 2 3 [WTF] holdLock should be marked WARN_UNUSED_RETURN 4 https://bugs.webkit.org/show_bug.cgi?id=196922 5 6 Reviewed by Keith Miller. 7 8 * wtf/Locker.h: 9 1 10 2019-04-16 Don Olmstead <don.olmstead@sony.com> 2 11 -
trunk/Source/WTF/wtf/Locker.h
r237099 r244352 31 31 #include <wtf/Assertions.h> 32 32 #include <wtf/Atomics.h> 33 #include <wtf/Compiler.h> 33 34 #include <wtf/Noncopyable.h> 34 35 … … 120 121 // auto locker = holdLock(lock); 121 122 template<typename LockType> 123 Locker<LockType> holdLock(LockType&) WARN_UNUSED_RETURN; 124 template<typename LockType> 122 125 Locker<LockType> holdLock(LockType& lock) 123 126 { … … 126 129 127 130 template<typename LockType> 131 Locker<LockType> holdLockIf(LockType&, bool predicate) WARN_UNUSED_RETURN; 132 template<typename LockType> 128 133 Locker<LockType> holdLockIf(LockType& lock, bool predicate) 129 134 { … … 131 136 } 132 137 138 template<typename LockType> 139 Locker<LockType> tryHoldLock(LockType&) WARN_UNUSED_RETURN; 133 140 template<typename LockType> 134 141 Locker<LockType> tryHoldLock(LockType& lock)
Note:
See TracChangeset
for help on using the changeset viewer.