mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefV8ContextHandler::OnUncaughtException callback (issue #736).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@857 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8context_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8exception_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h"
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
@ -74,6 +76,45 @@ void CEF_CALLBACK v8context_handler_on_context_released(
|
||||
CefV8ContextCToCpp::Wrap(context));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK v8context_handler_on_uncaught_exception(
|
||||
struct _cef_v8context_handler_t* self, cef_browser_t* browser,
|
||||
cef_frame_t* frame, cef_v8context_t* context, cef_v8exception_t* exception,
|
||||
cef_v8stack_trace_t* stackTrace) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return;
|
||||
// Verify param: frame; type: refptr_diff
|
||||
DCHECK(frame);
|
||||
if (!frame)
|
||||
return;
|
||||
// Verify param: context; type: refptr_diff
|
||||
DCHECK(context);
|
||||
if (!context)
|
||||
return;
|
||||
// Verify param: exception; type: refptr_diff
|
||||
DCHECK(exception);
|
||||
if (!exception)
|
||||
return;
|
||||
// Verify param: stackTrace; type: refptr_diff
|
||||
DCHECK(stackTrace);
|
||||
if (!stackTrace)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefV8ContextHandlerCppToC::Get(self)->OnUncaughtException(
|
||||
CefBrowserCToCpp::Wrap(browser),
|
||||
CefFrameCToCpp::Wrap(frame),
|
||||
CefV8ContextCToCpp::Wrap(context),
|
||||
CefV8ExceptionCToCpp::Wrap(exception),
|
||||
CefV8StackTraceCToCpp::Wrap(stackTrace));
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
@ -82,6 +123,8 @@ CefV8ContextHandlerCppToC::CefV8ContextHandlerCppToC(CefV8ContextHandler* cls)
|
||||
cef_v8context_handler_t>(cls) {
|
||||
struct_.struct_.on_context_created = v8context_handler_on_context_created;
|
||||
struct_.struct_.on_context_released = v8context_handler_on_context_released;
|
||||
struct_.struct_.on_uncaught_exception =
|
||||
v8context_handler_on_uncaught_exception;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
Reference in New Issue
Block a user