In <rdar://problem/15145394>, I observed a case where WebKit1 tests would fail to function because of repeated attempts to launch spellchecking service. DumpRenderTree calls -[WebView setContinuousSpellCheckingEnabled:YES] before each test, and this results in WebKit calling [[NSSpellChecker sharedSpellChecker] _preflightChosenSpellServer], which in turn launches the service if it's not launched yet. What I observed was that launchservicesd was busy servicing AppleSpell.service registrations, and this was making service launch time out, and this was making us try to re-launch it again and again. I'm not sure what the initial trigger for the misbehavior was, but repeatedly trying to relaunch an app that fails to launch makes little sense.
Created attachment 213369 [details] proposed patch
Comment on attachment 213369 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=213369&action=review > Source/WebKit/mac/WebView/WebView.mm:-5547 > if (continuousSpellCheckingEnabled != flag) { > continuousSpellCheckingEnabled = flag; > [[NSUserDefaults standardUserDefaults] setBool:continuousSpellCheckingEnabled forKey:WebContinuousSpellCheckingEnabled]; > - } I think this would read better as early return than with all the code nested inside and if statement.
> I think this would read better as early return than with all the code nested inside and if statement. Oops. Fixed and landed in <http://trac.webkit.org/r156949>.