Cleanup Binding, rather than keep references to the V8 objects, just use them and then let them be released

Code should be a little easier to debug now.
This commit is contained in:
amaitland
2015-07-28 22:22:30 +10:00
parent 2b34f80e7c
commit 3d19b3a587
13 changed files with 50 additions and 115 deletions
@@ -11,12 +11,12 @@ using namespace System;
namespace CefSharp
{
void JavascriptMethodWrapper::Bind()
void JavascriptMethodWrapper::Bind(const CefRefPtr<CefV8Value>& v8Value)
{
auto methodName = StringUtils::ToNative(_javascriptMethod->JavascriptName);
auto v8Function = CefV8Value::CreateFunction(methodName, _javascriptMethodHandler.get());
V8Value->SetValue(methodName, v8Function, V8_PROPERTY_ATTRIBUTE_NONE);
v8Value->SetValue(methodName, v8Function, V8_PROPERTY_ATTRIBUTE_NONE);
};
BrowserProcessResponse^ JavascriptMethodWrapper::Execute(array<Object^>^ parameters)