More the DeserializeV8Object call to within the context->Enter so a V8Object can be created
Change callback to use a struct as it's return type to demo the solution to this bug
Add missing list->SetDictionary call in V8Serialization.cpp
This commit is contained in:
amaitland
2015-11-18 09:17:16 +10:00
committed by amaitland
parent c0df93c1c4
commit 4de8dca04b
7 changed files with 34 additions and 9 deletions
@@ -251,12 +251,6 @@ namespace CefSharp
else
{
auto jsCallbackId = GetInt64(argList, 2);
auto parameterList = argList->GetList(3);
CefV8ValueList params;
for (CefV8ValueList::size_type i = 0; i < parameterList->GetSize(); i++)
{
params.push_back(DeserializeV8Object(parameterList, static_cast<int>(i)));
}
auto callbackWrapper = callbackRegistry->FindWrapper(jsCallbackId);
if (callbackWrapper == nullptr)
@@ -272,6 +266,16 @@ namespace CefSharp
{
try
{
auto parameterList = argList->GetList(3);
CefV8ValueList params;
//Needs to be called within the context as for Dictionary (mapped to struct)
//a V8Object will be created
for (CefV8ValueList::size_type i = 0; i < parameterList->GetSize(); i++)
{
params.push_back(DeserializeV8Object(parameterList, static_cast<int>(i)));
}
result = value->ExecuteFunction(nullptr, params);
success = result.get() != nullptr;