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
This commit is contained in:
Marshall Greenblatt 2012-11-20 20:21:59 +00:00
parent a3771028ce
commit a2f8d7ae90
1 changed files with 10 additions and 7 deletions

View File

@ -1838,13 +1838,16 @@ class V8RendererTest : public ClientApp::RenderDelegate {
// Call DevToolsLoaded() when DevTools window completed loading. // Call DevToolsLoaded() when DevTools window completed loading.
std::string jsCode = "(function(){" std::string jsCode = "(function(){"
" var oldLoadCompleted = InspectorFrontendAPI.loadCompleted;" " var oldLoadCompleted = InspectorFrontendAPI.loadCompleted;"
" InspectorFrontendAPI.loadCompleted = function(){" " if (InspectorFrontendAPI._isLoaded) {"
" oldLoadCompleted.call(InspectorFrontendAPI);" " window.DevToolsLoaded();"
" console.log('InspectorFrontendAPI.loadCompleted event fired');" " } else {"
" window.DevToolsLoaded();" " InspectorFrontendAPI.loadCompleted = function(){"
" };" " oldLoadCompleted.call(InspectorFrontendAPI);"
"})();"; " window.DevToolsLoaded();"
" };"
" }"
"})();";
CefRefPtr<CefV8Value> retval; CefRefPtr<CefV8Value> retval;
CefRefPtr<CefV8Exception> exception; CefRefPtr<CefV8Exception> exception;