mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Update to Chromium revision 138235.
- Move to the new DOM storage backend. Persistent localStorage support will need to be re-implemented (issue #603). - Add CefV8Value::CreateUInt method and indicate that integer types are 32bit via usage of int32 and uint32 types (issue #331). - Add CefV8Context::Eval method for synchronous JavaScript execution that returns a value or exception (issue #444). - Move exception handling from an ExecuteFunction argument to a CefV8Value attribute (issue #546). - Make user data an attribute for all CefV8Value object types and not just CreateObject (issue #547). - Un-fork SQLitePersistentCookieStore by adding stub implementations for sqlite_diagnostics and browser_thread. - Update tools/cef_parser.py to match the CEF3 version. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@644 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8exception_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
|
||||
|
||||
|
||||
@ -143,6 +144,69 @@ int CEF_CALLBACK v8context_is_same(struct _cef_v8context_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK v8context_eval(struct _cef_v8context_t* self,
|
||||
const cef_string_t* code, struct _cef_v8value_t** retval,
|
||||
struct _cef_v8exception_t** exception) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: code; type: string_byref_const
|
||||
DCHECK(code);
|
||||
if (!code)
|
||||
return 0;
|
||||
// Verify param: retval; type: refptr_same_byref
|
||||
DCHECK(retval);
|
||||
if (!retval)
|
||||
return 0;
|
||||
// Verify param: exception; type: refptr_same_byref
|
||||
DCHECK(exception);
|
||||
if (!exception)
|
||||
return 0;
|
||||
|
||||
// Translate param: retval; type: refptr_same_byref
|
||||
CefRefPtr<CefV8Value> retvalPtr;
|
||||
if (retval && *retval)
|
||||
retvalPtr = CefV8ValueCppToC::Unwrap(*retval);
|
||||
CefV8Value* retvalOrig = retvalPtr.get();
|
||||
// Translate param: exception; type: refptr_same_byref
|
||||
CefRefPtr<CefV8Exception> exceptionPtr;
|
||||
if (exception && *exception)
|
||||
exceptionPtr = CefV8ExceptionCppToC::Unwrap(*exception);
|
||||
CefV8Exception* exceptionOrig = exceptionPtr.get();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefV8ContextCppToC::Get(self)->Eval(
|
||||
CefString(code),
|
||||
retvalPtr,
|
||||
exceptionPtr);
|
||||
|
||||
// Restore param: retval; type: refptr_same_byref
|
||||
if (retval) {
|
||||
if (retvalPtr.get()) {
|
||||
if (retvalPtr.get() != retvalOrig) {
|
||||
*retval = CefV8ValueCppToC::Wrap(retvalPtr);
|
||||
}
|
||||
} else {
|
||||
*retval = NULL;
|
||||
}
|
||||
}
|
||||
// Restore param: exception; type: refptr_same_byref
|
||||
if (exception) {
|
||||
if (exceptionPtr.get()) {
|
||||
if (exceptionPtr.get() != exceptionOrig) {
|
||||
*exception = CefV8ExceptionCppToC::Wrap(exceptionPtr);
|
||||
}
|
||||
} else {
|
||||
*exception = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
@ -154,6 +218,7 @@ CefV8ContextCppToC::CefV8ContextCppToC(CefV8Context* cls)
|
||||
struct_.struct_.enter = v8context_enter;
|
||||
struct_.struct_.exit = v8context_exit;
|
||||
struct_.struct_.is_same = v8context_is_same;
|
||||
struct_.struct_.eval = v8context_eval;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
Reference in New Issue
Block a user