Make js callbacks and async methods Frame aware - add FrameId so they can be executed on a specific frame

Resolves a problem where multiple contexts are created and only the first one is dealt with properly (each frame has it's own V8 context)
This commit is contained in:
amaitland
2015-10-11 20:41:17 +10:00
parent 5869b20068
commit 2f3d9f868f
12 changed files with 108 additions and 60 deletions
@@ -38,10 +38,11 @@ namespace CefSharp
SerializeV8Object(arguments[i], params, i, _callbackRegistry);
}
SetInt64(_objectId, argList, 0);
SetInt64(callbackId, argList, 1);
argList->SetString(2, name);
argList->SetList(3, params);
SetInt64(context->GetFrame()->GetIdentifier(), argList, 0);
SetInt64(_objectId, argList, 1);
SetInt64(callbackId, argList, 2);
argList->SetString(3, name);
argList->SetList(4, params);
browser->SendProcessMessage(CefProcessId::PID_BROWSER, request);