Skip to content

Commit e1d4d3c

Browse files
committed
JavascriptAsyncMethodHandler::Execute - Add extra logging
- Add extra logging - Fix formatting - Add reference to relevant github issue Follow up to #2446
1 parent 6d74d60 commit e1d4d3c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ namespace CefSharp
2727

2828
//this will create a promise and give us the reject/resolve functions {p: Promise, res: resolve(), rej: reject()}
2929
auto promiseData = promiseCreator->ExecuteFunctionWithContext(context, nullptr, CefV8ValueList());
30-
//when refreshing the browser this is sometimes null, in this case return
31-
if(nullptr == promiseData) return true;
30+
31+
//when refreshing the browser this is sometimes null, in this case return true and log message
32+
//https://github.com/cefsharp/CefSharp/pull/2446
33+
if (promiseData == NULL)
34+
{
35+
LOG(WARNING) << "JavascriptAsyncMethodHandler::Execute promiseData returned NULL";
36+
37+
return true;
38+
}
3239

3340
retval = promiseData->GetValue("p");
3441

0 commit comments

Comments
 (0)