1 parent 863a820 commit cb35b21Copy full SHA for cb35b21
1 file changed
cefpython/cef3/subprocess/v8function_handler.cpp
@@ -11,6 +11,13 @@ bool V8FunctionHandler::Execute(const CefString& functionName,
11
const CefV8ValueList& v8Arguments,
12
CefRefPtr<CefV8Value>& returnValue,
13
CefString& exception) {
14
+ if (!CefV8Context::InContext()) {
15
+ // CefV8Context::GetCurrentContext may not be called when
16
+ // not in a V8 context.
17
+ DebugLog("Renderer: V8FunctionHandler::Execute() FAILED:"\
18
+ " not inside a V8 context");
19
+ return false;
20
+ }
21
CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext();
22
CefRefPtr<CefBrowser> browser = context.get()->GetBrowser();
23
CefRefPtr<CefFrame> frame = context.get()->GetFrame();
0 commit comments