Changeset 248529 in webkit
- Timestamp:
- Aug 12, 2019 9:06:02 AM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r248525 r248529 1 2019-08-12 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, rolling out r248525. 4 5 Revert new threading assertions while I work on fixing the 6 issues they exposed 7 8 Reverted changeset: 9 10 "Add threading assertions to RefCounted" 11 https://bugs.webkit.org/show_bug.cgi?id=200507 12 https://trac.webkit.org/changeset/248525 13 1 14 2019-08-11 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
r248525 r248529 151 151 { 152 152 RELEASE_ASSERT(m_codeBlock->alternative()->jitCode()); 153 m_inlineCallFrames->disableThreadingChecks();154 153 } 155 154 -
trunk/Source/WTF/ChangeLog
r248525 r248529 1 2019-08-12 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, rolling out r248525. 4 5 Revert new threading assertions while I work on fixing the 6 issues they exposed 7 8 Reverted changeset: 9 10 "Add threading assertions to RefCounted" 11 https://bugs.webkit.org/show_bug.cgi?id=200507 12 https://trac.webkit.org/changeset/248525 13 1 14 2019-08-11 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
r248525 r248529 62 62 3337DB9CE743410FAF076E17 /* StackTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 313EDEC9778E49C9BEA91CFC /* StackTrace.cpp */; }; 63 63 4427C5AA21F6D6C300A612A4 /* ASCIICType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4427C5A921F6D6C300A612A4 /* ASCIICType.cpp */; }; 64 46BEB6EB22FFE24900269867 /* RefCounted.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46BEB6E922FFDDD500269867 /* RefCounted.cpp */; };65 64 50DE35F5215BB01500B979C7 /* ExternalStringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50DE35F3215BB01500B979C7 /* ExternalStringImpl.cpp */; }; 66 65 515F794E1CFC9F4A00CCED93 /* CrossThreadCopier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515F794B1CFC9F4A00CCED93 /* CrossThreadCopier.cpp */; }; … … 346 345 4427C5A921F6D6C300A612A4 /* ASCIICType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASCIICType.cpp; sourceTree = "<group>"; }; 347 346 46BA9EAB1F4CD61E009A2BBC /* CompletionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompletionHandler.h; sourceTree = "<group>"; }; 348 46BEB6E922FFDDD500269867 /* RefCounted.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RefCounted.cpp; sourceTree = "<group>"; };349 347 50DE35F3215BB01500B979C7 /* ExternalStringImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExternalStringImpl.cpp; sourceTree = "<group>"; }; 350 348 50DE35F4215BB01500B979C7 /* ExternalStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExternalStringImpl.h; sourceTree = "<group>"; }; … … 1110 1108 A8A472FE151A825B004123FF /* RedBlackTree.h */, 1111 1109 26299B6D17A9E5B800ADEBE5 /* Ref.h */, 1112 46BEB6E922FFDDD500269867 /* RefCounted.cpp */,1113 1110 A8A472FF151A825B004123FF /* RefCounted.h */, 1114 1111 A8A47300151A825B004123FF /* RefCountedArray.h */, … … 1604 1601 A8A47414151A825B004123FF /* RandomNumber.cpp in Sources */, 1605 1602 0FEC3C5E1F368A9700F59B6C /* ReadWriteLock.cpp in Sources */, 1606 46BEB6EB22FFE24900269867 /* RefCounted.cpp in Sources */,1607 1603 A8A4741A151A825B004123FF /* RefCountedLeakCounter.cpp in Sources */, 1608 1604 E392FA2722E92BFF00ECDC73 /* ResourceUsageCocoa.cpp in Sources */, -
trunk/Source/WTF/wtf/CMakeLists.txt
r248525 r248529 394 394 RandomNumber.cpp 395 395 ReadWriteLock.cpp 396 RefCounted.cpp397 396 RefCountedLeakCounter.cpp 398 397 RunLoop.cpp -
trunk/Source/WTF/wtf/RefCounted.h
r248525 r248529 23 23 #include <wtf/Assertions.h> 24 24 #include <wtf/FastMalloc.h> 25 #include <wtf/MainThread.h>26 25 #include <wtf/Noncopyable.h> 27 26 … … 41 40 void ref() const 42 41 { 43 #if !ASSERT_DISABLED44 if (m_isOwnedByMainThread != isMainThread() && hasOneRef())45 m_isOwnedByMainThread = isMainThread(); // Likely ownership transfer.46 47 // If you hit this assertion, it means that the RefCounted object was ref'd or deref'd48 // concurrent from several threads, which is not safe. You should either subclass49 // ThreadSafeRefCounted instead, or make sure to always ref / deref from the same thread.50 ASSERT_WITH_MESSAGE(!areThreadingCheckedEnabled() || m_isOwnedByMainThread == isMainThread(), "Should not be ref'd / deref'd concurrently from several threads");51 #endif52 53 42 #if CHECK_REF_COUNTED_LIFECYCLE 54 43 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun); … … 80 69 } 81 70 82 // Please only call this method if you really know that what you're doing is safe (e.g.83 // locking at call sites).84 void disableThreadingChecks()85 {86 #if !ASSERT_DISABLED87 m_areThreadingChecksEnabled = false;88 #endif89 }90 91 static void enableThreadingChecksGlobally()92 {93 #if !ASSERT_DISABLED94 areThreadingChecksEnabledGlobally = true;95 #endif96 }97 98 71 protected: 99 72 RefCountedBase() 100 73 : m_refCount(1) 101 #if !ASSERT_DISABLED102 , m_isOwnedByMainThread(isMainThread())103 #endif104 74 #if CHECK_REF_COUNTED_LIFECYCLE 105 75 , m_deletionHasBegun(false) … … 108 78 { 109 79 } 110 111 #if !ASSERT_DISABLED112 bool areThreadingCheckedEnabled() const113 {114 return areThreadingChecksEnabledGlobally && m_areThreadingChecksEnabled;115 }116 #endif117 80 118 81 ~RefCountedBase() … … 127 90 bool derefBase() const 128 91 { 129 #if !ASSERT_DISABLED130 if (m_isOwnedByMainThread != isMainThread() && hasOneRef())131 m_isOwnedByMainThread = isMainThread(); // Likely ownership transfer.132 133 // If you hit this assertion, it means that the RefCounted object was ref'd or deref'd134 // concurrent from several threads, which is not safe. You should either subclass135 // ThreadSafeRefCounted instead, or make sure to always ref / deref from the same thread.136 ASSERT_WITH_MESSAGE(!areThreadingCheckedEnabled() || m_isOwnedByMainThread == isMainThread(), "Should not be ref'd / deref'd concurrently from several threads");137 #endif138 139 92 #if CHECK_REF_COUNTED_LIFECYCLE 140 93 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun); … … 168 121 169 122 mutable unsigned m_refCount; 170 #if !ASSERT_DISABLED171 mutable bool m_isOwnedByMainThread;172 bool m_areThreadingChecksEnabled { true };173 WTF_EXPORT_PRIVATE static bool areThreadingChecksEnabledGlobally;174 #endif175 123 #if CHECK_REF_COUNTED_LIFECYCLE 176 124 mutable bool m_deletionHasBegun; -
trunk/Source/WTF/wtf/SizeLimits.cpp
r248525 r248529 46 46 bool b; 47 47 bool c; 48 bool d;49 bool e;50 48 // The debug version may get bigger. 51 49 }; -
trunk/Source/WebKit/ChangeLog
r248526 r248529 1 2019-08-12 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, rolling out r248525. 4 5 Revert new threading assertions while I work on fixing the 6 issues they exposed 7 8 Reverted changeset: 9 10 "Add threading assertions to RefCounted" 11 https://bugs.webkit.org/show_bug.cgi?id=200507 12 https://trac.webkit.org/changeset/248525 13 1 14 2019-08-12 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebKit/Shared/AuxiliaryProcess.cpp
r248525 r248529 61 61 void AuxiliaryProcess::initialize(const AuxiliaryProcessInitializationParameters& parameters) 62 62 { 63 WTF::RefCountedBase::enableThreadingChecksGlobally();64 65 63 RELEASE_ASSERT_WITH_MESSAGE(parameters.processIdentifier, "Unable to initialize child process without a WebCore process identifier"); 66 64 Process::setIdentifier(*parameters.processIdentifier); -
trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm
r248525 r248529 32 32 #import <mutex> 33 33 #import <wtf/MainThread.h> 34 #import <wtf/RefCounted.h>35 34 #import <wtf/RunLoop.h> 36 35 … … 51 50 JSC::initializeThreading(); 52 51 RunLoop::initializeMainRunLoop(); 53 54 WTF::RefCountedBase::enableThreadingChecksGlobally();55 52 56 53 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebKit/Shared/WebKit2Initialize.cpp
r248525 r248529 31 31 #include <WebCore/LogInitialization.h> 32 32 #include <wtf/MainThread.h> 33 #include <wtf/RefCounted.h>34 33 #include <wtf/RunLoop.h> 35 34 … … 43 42 RunLoop::initializeMainRunLoop(); 44 43 45 WTF::RefCountedBase::enableThreadingChecksGlobally();46 47 44 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 48 45 WebCore::initializeLogChannelsIfNecessary(); -
trunk/Source/WebKitLegacy/mac/ChangeLog
r248526 r248529 1 2019-08-12 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, rolling out r248525. 4 5 Revert new threading assertions while I work on fixing the 6 issues they exposed 7 8 Reverted changeset: 9 10 "Add threading assertions to RefCounted" 11 https://bugs.webkit.org/show_bug.cgi?id=200507 12 https://trac.webkit.org/changeset/248525 13 1 14 2019-08-12 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r248525 r248529 5417 5417 #endif 5418 5418 5419 WTF::RefCountedBase::enableThreadingChecksGlobally();5420 5421 5419 WTF::setProcessPrivileges(allPrivileges()); 5422 5420 WebCore::NetworkStorageSession::permitProcessToUseCookieAPI(true);
Note: See TracChangeset
for help on using the changeset viewer.