cefsharp/CefSharp — pull request #433 by numbersint (2014-07-31 12:22:51+00:00)
Title: Fix crash when responding to cancelled request, take 2

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.