mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Allow CefV8Context::Eval to bypass CSP (issue #2024)
This commit is contained in:
@ -172,7 +172,8 @@ bool CefV8ContextCToCpp::IsSame(CefRefPtr<CefV8Context> that) {
|
||||
}
|
||||
|
||||
bool CefV8ContextCToCpp::Eval(const CefString& code,
|
||||
CefRefPtr<CefV8Value>& retval, CefRefPtr<CefV8Exception>& exception) {
|
||||
const CefString& script_url, int start_line, CefRefPtr<CefV8Value>& retval,
|
||||
CefRefPtr<CefV8Exception>& exception) {
|
||||
cef_v8context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, eval))
|
||||
return false;
|
||||
@ -183,6 +184,7 @@ bool CefV8ContextCToCpp::Eval(const CefString& code,
|
||||
DCHECK(!code.empty());
|
||||
if (code.empty())
|
||||
return false;
|
||||
// Unverified params: script_url
|
||||
|
||||
// Translate param: retval; type: refptr_same_byref
|
||||
cef_v8value_t* retvalStruct = NULL;
|
||||
@ -198,6 +200,8 @@ bool CefV8ContextCToCpp::Eval(const CefString& code,
|
||||
// Execute
|
||||
int _retval = _struct->eval(_struct,
|
||||
code.GetStruct(),
|
||||
script_url.GetStruct(),
|
||||
start_line,
|
||||
&retvalStruct,
|
||||
&exceptionStruct);
|
||||
|
||||
|
Reference in New Issue
Block a user