Allow CefV8Context::Eval to bypass CSP (issue #2024)

This commit is contained in:
Marshall Greenblatt
2016-10-27 12:34:19 -04:00
parent f7a4102978
commit 0e97c527ae
14 changed files with 274 additions and 52 deletions

View File

@ -178,8 +178,8 @@ int CEF_CALLBACK v8context_is_same(struct _cef_v8context_t* self,
}
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) {
const cef_string_t* code, const cef_string_t* script_url, int start_line,
struct _cef_v8value_t** retval, struct _cef_v8exception_t** exception) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -197,6 +197,7 @@ int CEF_CALLBACK v8context_eval(struct _cef_v8context_t* self,
DCHECK(exception);
if (!exception)
return 0;
// Unverified params: script_url
// Translate param: retval; type: refptr_same_byref
CefRefPtr<CefV8Value> retvalPtr;
@ -212,6 +213,8 @@ int CEF_CALLBACK v8context_eval(struct _cef_v8context_t* self,
// Execute
bool _retval = CefV8ContextCppToC::Get(self)->Eval(
CefString(code),
CefString(script_url),
start_line,
retvalPtr,
exceptionPtr);