emit did-fail-load event when the url char length exceeds limit
This commit is contained in:
parent
54559f99a0
commit
f9dc08baf6
1 changed files with 1 additions and 1 deletions
|
@ -861,7 +861,7 @@ bool WebContents::Equal(const WebContents* web_contents) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) {
|
void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) {
|
||||||
if (!url.is_valid()) {
|
if (!url.is_valid() || url.spec().size() > url::kMaxURLChars) {
|
||||||
Emit("did-fail-load",
|
Emit("did-fail-load",
|
||||||
static_cast<int>(net::ERR_INVALID_URL),
|
static_cast<int>(net::ERR_INVALID_URL),
|
||||||
net::ErrorToShortString(net::ERR_INVALID_URL),
|
net::ErrorToShortString(net::ERR_INVALID_URL),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue