Changeset 239353 in webkit
- Timestamp:
- Dec 18, 2018 2:03:07 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239352 r239353 1 2018-12-18 Ryosuke Niwa <rniwa@webkit.org> 2 3 Some iOS app crash in FrameLoader::checkCompleted 4 https://bugs.webkit.org/show_bug.cgi?id=192804 5 <rdar://problem/44240573> 6 7 Reviewed by Tim Horton. 8 9 It's possible for the main thread to call into WebCore / UIWebView selectors while Web thread 10 is trying to send a delegate message. Disable the release assertion while this is happening 11 so that iOS app would not crash. 12 13 Unfortunately no new test as there is no way to easily test UIWebView in iOS, 14 and this requires a race between the web thread & the main thread. 15 16 * dom/ScriptDisallowedScope.h: 17 (WebCore::ScriptDisallowedScope::InMainThread::isScriptAllowed): 18 * platform/ios/wak/WebCoreThread.h: 19 * platform/ios/wak/WebCoreThread.mm: 20 (WebThreadDelegateMessageScope::WebThreadDelegateMessageScope): 21 (WebThreadDelegateMessageScope::~WebThreadDelegateMessageScope): 22 (SendDelegateMessage): 23 1 24 2018-12-18 David Kilzer <ddkilzer@apple.com> 2 25 -
trunk/Source/WebCore/dom/ScriptDisallowedScope.h
r230983 r239353 26 26 #include "ContainerNode.h" 27 27 #include <wtf/MainThread.h> 28 29 #if PLATFORM(IOS_FAMILY) 30 #include "WebCoreThread.h" 31 #endif 28 32 29 33 namespace WebCore { … … 87 91 { 88 92 ASSERT(isMainThread()); 93 #if PLATFORM(IOS_FAMILY) 94 return !s_count || webThreadDelegateMessageScopeCount; 95 #else 89 96 return !s_count; 97 #endif 90 98 } 91 99 }; -
trunk/Source/WebCore/platform/ios/wak/WebCoreThread.h
r226291 r239353 45 45 46 46 extern volatile bool webThreadShouldYield; 47 extern volatile unsigned webThreadDelegateMessageScopeCount; 47 48 48 49 #ifdef __OBJC__ -
trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm
r237266 r239353 133 133 static NSMutableArray* sAsyncDelegates = nil; 134 134 135 WEBCORE_EXPORT volatile unsigned webThreadDelegateMessageScopeCount = 0; 136 135 137 static inline void SendMessage(NSInvocation* invocation) 136 138 { … … 172 174 } 173 175 176 class WebThreadDelegateMessageScope { 177 public: 178 WebThreadDelegateMessageScope() { ++webThreadDelegateMessageScopeCount; } 179 ~WebThreadDelegateMessageScope() 180 { 181 ASSERT(webThreadDelegateMessageScopeCount); 182 --webThreadDelegateMessageScopeCount; 183 } 184 }; 185 174 186 static void SendDelegateMessage(NSInvocation* invocation) 175 187 { … … 195 207 196 208 { 209 WebThreadDelegateMessageScope delegateScope; 197 210 // Code block created to scope JSC::JSLock::DropAllLocks outside of WebThreadLock() 198 211 JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
Note: See TracChangeset
for help on using the changeset viewer.