mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
Fixed duplicate calls to OnContextCreated (#5073)
* Added a reload button * Added checks for V8Context
This commit is contained in:
@@ -131,6 +131,12 @@ namespace CefSharp
|
||||
_handler->OnContextCreated(% browserWrapper, % frameWrapper, % contextWrapper);
|
||||
}
|
||||
|
||||
//Skip additional contexts (DevTools, extensions) to avoid
|
||||
//double binding and duplicate calls to IRenderProcessMessageHandler.OnContextCreated
|
||||
//https://github.com/chromiumembedded/cef/issues/3867
|
||||
bool isSameContext = frame->GetV8Context()->IsSame(context);
|
||||
if (!isSameContext)
|
||||
return;
|
||||
auto rootObject = GetJsRootObjectWrapper(browser->GetIdentifier(), frame->GetIdentifier());
|
||||
|
||||
if (_legacyBindingEnabled)
|
||||
|
||||
Reference in New Issue
Block a user