| Summary: | REGRESSION (r258064): API tests intermittently crashing under WebKit::registerDefaultsOverride | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryan Haddad <ryanhaddad> | ||||||||
| Component: | New Bugs | Assignee: | Per Arne Vollan <pvollan> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | bfulgham, darin, pvollan, webkit-bot-watchers-bugzilla, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=208690 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Ryan Haddad
2020-03-08 09:42:56 PDT
Looking into this now. Created attachment 392976 [details]
Patch
Comment on attachment 392976 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=392976&action=review > Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm:107 > registerDefaultsOriginal = method_setImplementation(registerDefaultsMethod, (IMP)registerDefaultsOverride); Is this early enough? Seems like there is a race here if registerDefaults is being called on another thread. Doing it on the main thread is good, but also it needs to be really early, before other threads exist. Created attachment 392993 [details]
Patch
(In reply to Darin Adler from comment #4) > Comment on attachment 392976 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=392976&action=review > > > Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm:107 > > registerDefaultsOriginal = method_setImplementation(registerDefaultsMethod, (IMP)registerDefaultsOverride); > > Is this early enough? Seems like there is a race here if registerDefaults is > being called on another thread. Doing it on the main thread is good, but > also it needs to be really early, before other threads exist. Yes, this should be early enough. As long as we do it before we start observing preference changes, we should be fine! Thanks for reviewing! Committed r258119: <https://trac.webkit.org/changeset/258119/webkit>. |