Changeset 233466 in webkit
- Timestamp:
- Jul 3, 2018 9:50:57 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r233463 r233466 1 2018-07-03 Jonathan Bedard <jbedard@apple.com> 2 3 Unreviewed, rolling out r233461. 4 5 Assertions triggered during iOS 11 debug layout and API tests 6 7 Reverted changeset: 8 9 "[iOS] Add assert to catch improper use of WebCore::Timer in 10 UI Process" 11 https://bugs.webkit.org/show_bug.cgi?id=185330 12 https://trac.webkit.org/changeset/233461 13 1 14 2018-07-03 Frederic Wang <fwang@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r233464 r233466 1 2018-07-03 Jonathan Bedard <jbedard@apple.com> 2 3 Unreviewed, rolling out r233461. 4 5 Assertions triggered during iOS 11 debug layout and API tests 6 7 Reverted changeset: 8 9 "[iOS] Add assert to catch improper use of WebCore::Timer in 10 UI Process" 11 https://bugs.webkit.org/show_bug.cgi?id=185330 12 https://trac.webkit.org/changeset/233461 13 1 14 2018-07-03 Jer Noble <jer.noble@apple.com> 2 15 -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp
r233461 r233466 47 47 } 48 48 49 #if !PLATFORM(WIN)50 static WebKitProcessType s_webKitProcessType { WebKitProcessType::UIProcess };51 52 void setWebKitProcessType(WebKitProcessType type)53 {54 s_webKitProcessType = type;55 }56 57 bool isInNetworkProcess()58 {59 return s_webKitProcessType == WebKitProcessType::NetworkProcess;60 }61 62 bool isInStorageProcess()63 {64 return s_webKitProcessType == WebKitProcessType::StorageProcess;65 }66 67 bool isInWebProcess()68 {69 return s_webKitProcessType == WebKitProcessType::WebProcess;70 }71 #endif72 73 49 int presentingApplicationPID() 74 50 { -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.h
r233461 r233466 34 34 35 35 #if PLATFORM(WIN) 36 inline bool isInNetworkProcess() { return false; }37 inline bool isInStorageProcess() { return false; }38 36 inline bool isInWebProcess() { return false; } 39 #else 40 enum class WebKitProcessType { UIProcess = 0, NetworkProcess, StorageProcess, WebProcess }; 41 WEBCORE_EXPORT void setWebKitProcessType(WebKitProcessType); 42 bool isInNetworkProcess(); 43 bool isInStorageProcess(); 44 bool isInWebProcess(); 37 #elif !PLATFORM(COCOA) 38 inline bool isInWebProcess() { return true; } 45 39 #endif 46 40 47 41 #if PLATFORM(COCOA) 42 43 bool isInWebProcess(); 48 44 49 45 WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&); -
trunk/Source/WebCore/platform/Timer.cpp
r233461 r233466 28 28 #include "Timer.h" 29 29 30 #include "Logging.h"31 #include "RuntimeApplicationChecks.h"32 30 #include "SharedTimer.h" 33 31 #include "ThreadGlobalData.h" … … 36 34 #include <limits> 37 35 #include <math.h> 38 #include <wtf/Compiler.h>39 36 #include <wtf/MainThread.h> 40 37 #include <wtf/Vector.h> 41 42 #if USE(WEB_THREAD)43 #include "WebCoreThread.h"44 #endif45 38 46 39 namespace WebCore { … … 194 187 TimerBase::TimerBase() 195 188 { 196 #if PLATFORM(IOS)197 if (UNLIKELY(!isAllowed())) {198 #define WEBCORE_TIMERBASE_ASSERTION_MESSAGE "WebCore::Timer should not be used in UI Process."199 ASSERT_WITH_MESSAGE(false, WEBCORE_TIMERBASE_ASSERTION_MESSAGE);200 RELEASE_LOG_FAULT(Threading, WEBCORE_TIMERBASE_ASSERTION_MESSAGE);201 #undef WEBCORE_TIMERBASE_ASSERTION_MESSAGE202 }203 #endif204 189 } 205 190 … … 256 241 if (inHeap()) 257 242 checkHeapIndex(); 258 }259 260 bool TimerBase::isAllowed()261 {262 #if PLATFORM(IOS)263 if (isInWebProcess() || isInNetworkProcess() || isInStorageProcess())264 return true;265 266 #if USE(WEB_THREAD)267 if (WebThreadIsEnabled() && (WebThreadIsCurrent() || WebThreadIsLocked()))268 return true;269 #endif270 271 return false;272 #else273 return true;274 #endif275 243 } 276 244 -
trunk/Source/WebCore/platform/Timer.h
r233461 r233466 79 79 void checkHeapIndex() const; 80 80 81 static bool isAllowed();82 83 81 void setNextFireTime(MonotonicTime); 84 82 -
trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
r233461 r233466 66 66 } 67 67 68 bool isInWebProcess() 69 { 70 static bool mainBundleIsWebProcess = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent.Development"] 71 || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent"] 72 || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebProcess"]; 73 return mainBundleIsWebProcess; 74 } 75 68 76 static bool applicationBundleIsEqualTo(const String& bundleIdentifierString) 69 77 { -
trunk/Source/WebKit/ChangeLog
r233465 r233466 1 2018-07-03 Jonathan Bedard <jbedard@apple.com> 2 3 Unreviewed, rolling out r233461. 4 5 Assertions triggered during iOS 11 debug layout and API tests 6 7 Reverted changeset: 8 9 "[iOS] Add assert to catch improper use of WebCore::Timer in 10 UI Process" 11 https://bugs.webkit.org/show_bug.cgi?id=185330 12 https://trac.webkit.org/changeset/233461 13 1 14 2018-07-03 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r233461 r233466 129 129 webProcessConnection->setOnLineState(isOnLine); 130 130 }); 131 132 WebCore::setWebKitProcessType(WebKitProcessType::NetworkProcess);133 131 } 134 132 -
trunk/Source/WebKit/StorageProcess/StorageProcess.cpp
r233461 r233466 41 41 #include <WebCore/IDBKeyData.h> 42 42 #include <WebCore/NotImplemented.h> 43 #include <WebCore/RuntimeApplicationChecks.h>44 43 #include <WebCore/SWServerWorker.h> 45 44 #include <WebCore/SecurityOrigin.h> … … 74 73 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=135365 - Need a more explicit way of doing this besides accessing the UTF8Encoding. 75 74 UTF8Encoding(); 76 77 WebCore::setWebKitProcessType(WebKitProcessType::StorageProcess);78 75 } 79 76 -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r233461 r233466 210 210 211 211 Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled(); 212 213 WebCore::setWebKitProcessType(WebKitProcessType::WebProcess);214 212 } 215 213
Note: See TracChangeset
for help on using the changeset viewer.