mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
JavascriptAsyncMethodHandler - Obtain Promise from context on Execute
Previously the promise reference was passed into the handler, now we obtain the reference on demand
This commit is contained in:
@@ -15,7 +15,7 @@ namespace CefSharp
|
||||
{
|
||||
namespace Async
|
||||
{
|
||||
void JavascriptAsyncObjectWrapper::Bind(JavascriptObject^ object, const CefRefPtr<CefV8Value> &value, const CefRefPtr<CefV8Value> &promiseCreator)
|
||||
void JavascriptAsyncObjectWrapper::Bind(JavascriptObject^ object, const CefRefPtr<CefV8Value> &value)
|
||||
{
|
||||
//V8Value that represents this javascript object - only one per complex type, no accessor
|
||||
auto javascriptObject = CefV8Value::CreateObject(nullptr, nullptr);
|
||||
@@ -24,7 +24,7 @@ namespace CefSharp
|
||||
|
||||
for each (JavascriptMethod^ method in Enumerable::OfType<JavascriptMethod^>(object->Methods))
|
||||
{
|
||||
auto wrappedMethod = gcnew JavascriptAsyncMethodWrapper(object->Id, _callbackRegistry, promiseCreator, _methodCallbackSave);
|
||||
auto wrappedMethod = gcnew JavascriptAsyncMethodWrapper(object->Id, _callbackRegistry, _methodCallbackSave);
|
||||
wrappedMethod->Bind(method, javascriptObject);
|
||||
|
||||
_wrappedMethods->Add(wrappedMethod);
|
||||
|
||||
Reference in New Issue
Block a user