invalidateCallbackMap in GenericCallback.h doesn’t pass its error parameter on to the callbacks’ invalidate function. Therefore the error passed into -[WKWebView evaluateJavaScript:completionHandler:]’s completion handler is always WKErrorUnknown, and the completion handler is called synchronously in the PageInvalidated case, even though it’s supposed to be deferred.
<rdar://problem/17316653>
Created attachment 233141 [details] Patch
Committed r169990: <http://trac.webkit.org/changeset/169990>