cefsharp/CefSharp — pull request #432 by numbersint (2014-07-31 08:58:01+00:00)
Title: Fix crash when responding to cancelled request

I use an ISchemeHandler that accepts a long-polling AJAX request, and responds some time later. If CEF cancels the SchemeHandlerWrapper (e.g. due to navigating to another URL), and my response later attempts to call the response completed callback, a NullReferenceException occurs.

I debated whether to add an IsCancelled flag and make the ISchemeHandler implementer check this flag before responding, but just throwing away the response seems less error-prone.