From a2f8d7ae906eb5f2a0592c19d3f073c701fe3958 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 20 Nov 2012 20:21:59 +0000 Subject: [PATCH] Merge revision 913 changes: - Fix inspector hook in V8Test.OnUncaughtExceptionDevTools (issue #736). git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1271@914 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef3/tests/unittests/v8_unittest.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/cef3/tests/unittests/v8_unittest.cc b/cef3/tests/unittests/v8_unittest.cc index b30ea57fa..a06582e0b 100644 --- a/cef3/tests/unittests/v8_unittest.cc +++ b/cef3/tests/unittests/v8_unittest.cc @@ -1838,13 +1838,16 @@ class V8RendererTest : public ClientApp::RenderDelegate { // Call DevToolsLoaded() when DevTools window completed loading. std::string jsCode = "(function(){" - " var oldLoadCompleted = InspectorFrontendAPI.loadCompleted;" - " InspectorFrontendAPI.loadCompleted = function(){" - " oldLoadCompleted.call(InspectorFrontendAPI);" - " console.log('InspectorFrontendAPI.loadCompleted event fired');" - " window.DevToolsLoaded();" - " };" - "})();"; + " var oldLoadCompleted = InspectorFrontendAPI.loadCompleted;" + " if (InspectorFrontendAPI._isLoaded) {" + " window.DevToolsLoaded();" + " } else {" + " InspectorFrontendAPI.loadCompleted = function(){" + " oldLoadCompleted.call(InspectorFrontendAPI);" + " window.DevToolsLoaded();" + " };" + " }" + "})();"; CefRefPtr retval; CefRefPtr exception;