chillitom/CefSharp — pull request #87 by dshafer (2012-09-08 04:06:49+00:00)
Title: Support js callbacks v2

this is a second suggestion for solving the issue of providing support for Javascript Callbacks (issue #85)

This branch slightly changes the behavior of CefSharp's BindingHandler::Execute function:
* previously, all CLR methods invoked by BindingHandler::Execute() were executed synchronously
* now, calls to CLR methods that return System::Void will be executed asynchronously on the System::Threading::ThreadPool
* After execution, any CefCallbackWrapper objects involved in these calls will be automatically disposed.
* Calls to CLR methods that return a non-void result will still be executed synchronously.

I believe that this behavior change will not negatively impact existing codebase. Any callers who depended on a return value from their call into CLR code will see the exact same result. Only callers who depended on side-effects from calls to functions returning void would possibly be affected.