JavascriptAsyncMethodHandler::Execute - Add extra logging

- Add extra logging
- Fix formatting
- Add reference to relevant github issue

Follow up to https://github.com/cefsharp/CefSharp/pull/2446
This commit is contained in:
amaitland
2018-07-09 20:31:15 +10:00
parent 8fb47b4761
commit 49d353bc9e
@@ -27,8 +27,15 @@ namespace CefSharp
//this will create a promise and give us the reject/resolve functions {p: Promise, res: resolve(), rej: reject()}
auto promiseData = promiseCreator->ExecuteFunctionWithContext(context, nullptr, CefV8ValueList());
//when refreshing the browser this is sometimes null, in this case return
if(nullptr == promiseData) return true;
//when refreshing the browser this is sometimes null, in this case return true and log message
//https://github.com/cefsharp/CefSharp/pull/2446
if (promiseData == NULL)
{
LOG(WARNING) << "JavascriptAsyncMethodHandler::Execute promiseData returned NULL";
return true;
}
retval = promiseData->GetValue("p");