New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not emit did-fail-load for canceled requests #6201

Merged
merged 1 commit into from Jun 23, 2016

Conversation

Projects
None yet
2 participants
@zcbenz
Contributor

zcbenz commented Jun 23, 2016

For all ERR_ABORTED errors happened in DidFailProvisionalLoad, the requests are actually canceled, like:

  • page redirects
  • page starts a download
  • have two calls of loadURL together

Which do not satisfy the use cases of did-fail-load event, and causes surprises to users.

So this PR suppresses ERR_ABORTED for DidFailProvisionalLoad, closes #4396.

@zcbenz zcbenz merged commit d959ccb into master Jun 23, 2016

7 of 8 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
electron-linux-arm Build #3509082 succeeded in 46s
Details
electron-linux-ia32 Build #3509083 succeeded in 38s
Details
electron-linux-x64 Build #3509084 succeeded in 123s
Details
electron-mas-x64 Build #1689 succeeded in 6 min 0 sec
Details
electron-osx-x64 Build #1697 succeeded in 6 min 43 sec
Details
electron-win-ia32 Build #692 succeeded in 6 min 11 sec
Details
electron-win-x64 Build #682 succeeded in 6 min 5 sec
Details

@zcbenz zcbenz deleted the did-fail-load branch Jun 23, 2016

Mr0grog added a commit to Mr0grog/nightmare that referenced this pull request Aug 3, 2016

Also treat provisional failures as goto failures. Fixes segmentio#740.
Before v1.2.6, Electron always emitted failure events whenever it emitted provisional failures. Now some types of provisional failures are excepted, so we need to explicitly listen for and handle both.
See: electron/electron#6201

Mr0grog added a commit to Mr0grog/nightmare that referenced this pull request Aug 3, 2016

Also treat provisional failures as goto failures. Fixes segmentio#740.
Before v1.2.6, Electron always emitted failure events whenever it emitted provisional failures. Now some types of provisional failures are excepted, so we need to explicitly listen for and handle both.
See: electron/electron#6201

javan added a commit to javan/electron that referenced this pull request Jan 22, 2017

// Do not emit "did-fail-load" for canceled requests.
if (code != net::ERR_ABORTED)
Emit("did-fail-load", code, description, url, is_main_frame);

This comment has been minimized.

@nfantone

nfantone Mar 3, 2018

@zcbenz This is still being emitted on <webview> tag using 2.0.0-beta.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment