Add CefV8ContextHandler::OnUncaughtException callback (issue #736).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@890 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-11-02 18:16:28 +00:00
parent 202cdc4eb4
commit e599cc1fab
23 changed files with 613 additions and 14 deletions

View File

@@ -28,8 +28,9 @@ class ClientApp : public CefApp,
virtual void OnContextInitialized(CefRefPtr<ClientApp> app) {
}
// Called on the browser process IO thread before a child process is launched.
// Provides an opportunity to modify the child process command line.
// Called on the browser process IO thread before a child process is
// launched Provides an opportunity to modify the child process command
// line.
virtual void OnBeforeChildProcessLaunch(
CefRefPtr<ClientApp> app,
CefRefPtr<CefCommandLine> command_line) {
@@ -51,6 +52,11 @@ class ClientApp : public CefApp,
virtual void OnWebKitInitialized(CefRefPtr<ClientApp> app) {
}
// Called before a browser is destroyed.
virtual void OnBrowserDestroyed(CefRefPtr<ClientApp> app,
CefRefPtr<CefBrowser> browser) {
}
// Called when a V8 context is created. Used to create V8 window bindings
// and set message callbacks. RenderDelegates should check for unique URLs
// to avoid interfering with each other.
@@ -69,6 +75,16 @@ class ClientApp : public CefApp,
CefRefPtr<CefV8Context> context) {
}
// Global V8 exception handler, disabled by default, to enable set
// CefSettings.uncaught_exception_stack_size > 0.
virtual void OnUncaughtException(CefRefPtr<ClientApp> app,
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context,
CefRefPtr<CefV8Exception> exception,
CefRefPtr<CefV8StackTrace> stackTrace) {
}
// Called when the focused node in a frame has changed.
virtual void OnFocusedNodeChanged(CefRefPtr<ClientApp> app,
CefRefPtr<CefBrowser> browser,
@@ -152,12 +168,19 @@ class ClientApp : public CefApp,
// CefRenderProcessHandler methods.
virtual void OnRenderThreadCreated() OVERRIDE;
virtual void OnWebKitInitialized() OVERRIDE;
virtual void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) OVERRIDE;
virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) OVERRIDE;
virtual void OnUncaughtException(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context,
CefRefPtr<CefV8Exception> exception,
CefRefPtr<CefV8StackTrace> stackTrace)
OVERRIDE;
virtual void OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefDOMNode> node) OVERRIDE;