Eliminate the CefBrowser::HandleJSBinding() method to avoid memory leaks (issue #72).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@73 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-04-07 14:45:40 +00:00
parent 669244ca18
commit 6a0f9a6d40
19 changed files with 111 additions and 481 deletions

View File

@@ -4,7 +4,6 @@
#include "include/cef.h"
#include "cefclient.h"
#include "binding_test.h"
#include "extension_test.h"
#include "plugin_test.h"
#include "resource_util.h"
@@ -495,21 +494,6 @@ public:
return RV_CONTINUE;
}
// Event called for binding to a frame's JavaScript global object. The
// return value is currently ignored.
virtual RetVal HandleJSBinding(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Value> object)
{
// Add the V8 bindings.
InitBindingTest(browser, frame, object);
// Add the UI app V8 bindings.
InitUIBindingTest(browser, frame, object);
return RV_HANDLED;
}
// Called when the browser component is requesting focus. |isWidget| will be
// true if the focus is requested for a child widget of the browser window.
// Return RV_CONTINUE to allow the focus to be set or RV_HANDLED to cancel
@@ -773,11 +757,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if(browser.get())
browser->StopLoad();
return 0;
case ID_TESTS_JAVASCRIPT_HANDLER: // Test the V8 function handler
if(browser.get())
RunBindingTest(browser);
return 0;
case ID_TESTS_JAVASCRIPT_HANDLER2: // Test the V8 extension handler
case ID_TESTS_JAVASCRIPT_HANDLER: // Test the V8 extension handler
if(browser.get())
RunExtensionTest(browser);
return 0;