mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add warning to LoadRequest about INVALID_INITIATOR_ORIGIN (213) failure condition (see issue #2586)
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
// by hand. See the translator.README.txt file in the tools directory for
|
// by hand. See the translator.README.txt file in the tools directory for
|
||||||
// more information.
|
// more information.
|
||||||
//
|
//
|
||||||
// $hash=6bef924a259845dbf03e9cf5084ff7feb2771034$
|
// $hash=5f3cb132c1116a36c746c246ebeded195c917718$
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
|
#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
|
||||||
@@ -131,6 +131,10 @@ typedef struct _cef_frame_t {
|
|||||||
|
|
||||||
///
|
///
|
||||||
// Load the request represented by the |request| object.
|
// Load the request represented by the |request| object.
|
||||||
|
//
|
||||||
|
// WARNING: This function will fail with "bad IPC message" reason
|
||||||
|
// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
|
||||||
|
// origin using some other mechanism (LoadURL, link click, etc).
|
||||||
///
|
///
|
||||||
void(CEF_CALLBACK* load_request)(struct _cef_frame_t* self,
|
void(CEF_CALLBACK* load_request)(struct _cef_frame_t* self,
|
||||||
struct _cef_request_t* request);
|
struct _cef_request_t* request);
|
||||||
|
@@ -131,6 +131,10 @@ class CefFrame : public virtual CefBaseRefCounted {
|
|||||||
|
|
||||||
///
|
///
|
||||||
// Load the request represented by the |request| object.
|
// Load the request represented by the |request| object.
|
||||||
|
//
|
||||||
|
// WARNING: This method will fail with "bad IPC message" reason
|
||||||
|
// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the
|
||||||
|
// request origin using some other mechanism (LoadURL, link click, etc).
|
||||||
///
|
///
|
||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
virtual void LoadRequest(CefRefPtr<CefRequest> request) = 0;
|
virtual void LoadRequest(CefRefPtr<CefRequest> request) = 0;
|
||||||
|
@@ -100,6 +100,16 @@ void RunRequestTest(CefRefPtr<CefBrowser> browser) {
|
|||||||
// Create a new request
|
// Create a new request
|
||||||
CefRefPtr<CefRequest> request(CefRequest::Create());
|
CefRefPtr<CefRequest> request(CefRequest::Create());
|
||||||
|
|
||||||
|
if (browser->GetMainFrame()->GetURL().ToString().find("http://tests/") != 0) {
|
||||||
|
// The LoadRequest method will fail with "bad IPC message" reason
|
||||||
|
// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the
|
||||||
|
// request origin using some other mechanism (LoadURL, link click, etc).
|
||||||
|
Alert(browser,
|
||||||
|
"Please first navigate to a http://tests/ URL. "
|
||||||
|
"For example, first load Tests > Other Tests.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Set the request URL
|
// Set the request URL
|
||||||
request->SetURL("http://tests/request");
|
request->SetURL("http://tests/request");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user