| Summary: | Occasional crashes when running nested runloops while using UIWebView | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||||||||||||
| Component: | New Bugs | Assignee: | Tim Horton <thorton> | ||||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||||
| Severity: | Normal | CC: | aestes, cdumez, darin, ddkilzer, ggaren, krollin, mitz, nham, simon.fraser, webkit-bug-importer, wenson_hsieh | ||||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||
| Bug Depends on: | 213072 | ||||||||||||||||||
| Bug Blocks: | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
Tim Horton
2020-06-10 21:52:28 PDT
Created attachment 401618 [details]
Patch
I am not a CFRunLoop expert by any stretch of the imagination, so I hope someone can tell me if I'm doing something horribly wrong, or if there's a good reason not to do it this way. Comment on attachment 401618 [details]
Patch
r=me
I’ll CC Ben in case he can tell us that we did something wrong. Ugh, I think the bots will need a clean build (or I will need to fix the build system). I had the same failure locally 'till I did. Or maybe there's some file I can touch Created attachment 401621 [details]
Patch
Comment on attachment 401618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401618&action=review > Source/WebCore/platform/ios/wak/WebCoreThread.mm:667 > + RetainPtr<CFRunLoopObserverRef> mainRunLoopEntryObserver = adoptCF(CFRunLoopObserverCreate(nullptr, kCFRunLoopEntry, YES, 0, MainRunLoopEntry, nullptr)); > + RetainPtr<CFRunLoopObserverRef> mainRunLoopExitObserver = adoptCF(CFRunLoopObserverCreate(nullptr, kCFRunLoopExit, YES, 3000002, MainRunLoopExit, nullptr)); auto?. What does 3000002 come from? With Bug 213072 landed, I'm retrying the previously-failed builds. Comment on attachment 401618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401618&action=review >> Source/WebCore/platform/ios/wak/WebCoreThread.mm:667 >> + RetainPtr<CFRunLoopObserverRef> mainRunLoopExitObserver = adoptCF(CFRunLoopObserverCreate(nullptr, kCFRunLoopExit, YES, 3000002, MainRunLoopExit, nullptr)); > > auto?. What does 3000002 come from? I’d also like to learn about 3000002. Comment on attachment 401618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401618&action=review >>> Source/WebCore/platform/ios/wak/WebCoreThread.mm:667 >>> + RetainPtr<CFRunLoopObserverRef> mainRunLoopExitObserver = adoptCF(CFRunLoopObserverCreate(nullptr, kCFRunLoopExit, YES, 3000002, MainRunLoopExit, nullptr)); >> >> auto?. What does 3000002 come from? > > I’d also like to learn about 3000002. It's 3000001+1. 3000001 is 3000000+1. Perhaps we should give these some names :) (In reply to Tim Horton from comment #12) > Comment on attachment 401618 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=401618&action=review > > >>> Source/WebCore/platform/ios/wak/WebCoreThread.mm:667 > >>> + RetainPtr<CFRunLoopObserverRef> mainRunLoopExitObserver = adoptCF(CFRunLoopObserverCreate(nullptr, kCFRunLoopExit, YES, 3000002, MainRunLoopExit, nullptr)); > >> > >> auto?. What does 3000002 come from? > > > > I’d also like to learn about 3000002. > > It's 3000001+1. 3000001 is 3000000+1. > > Perhaps we should give these some names :) You mean like WellKnownRunLoopOrders Perfect! Also that suggests that 3000002 is actually 2000000+1000000+1 :) (In reply to Tim Horton from comment #14) > Perfect! Also that suggests that 3000002 is actually 2000000+1000000+1 :) Err +2 obv Created attachment 401965 [details]
Patch
Comment on attachment 401965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401965&action=review r=me > Source/WebCore/platform/ios/wak/WebCoreThread.mm:667 > + RetainPtr<CFRunLoopObserverRef> mainRunLoopExitObserver = adoptCF(CFRunLoopObserverCreate(nullptr, kCFRunLoopExit, YES, 3000002, MainRunLoopExit, nullptr)); Did we promise we’d give this a name? Created attachment 405865 [details]
Patch
Created attachment 405867 [details]
Patch
Created attachment 405869 [details]
Patch
Comment on attachment 405869 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405869&action=review > Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/WebThreadLock.mm:44 > + RetainPtr<CFRunLoopObserverRef> observer = adoptCF(CFRunLoopObserverCreateWithHandler(NULL, kCFRunLoopBeforeWaiting, NO, 2, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) { auto Created attachment 405871 [details]
Patch
Committed r265229: <https://trac.webkit.org/changeset/265229> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405871 [details]. |