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

Eagerly require protocol #6195

Merged
merged 1 commit into from Jun 23, 2016

Conversation

Projects
None yet
2 participants
@kevinsawicki
Contributor

kevinsawicki commented Jun 23, 2016

This is a secondary fix for #6094 and pull request #6095

Previously it was still possible to access protocol without the properties after `ready has fired:

let protocol

app.on('ready', function () {
  // will be undefined
  console.log(protocol.interceptFileProtocol) 
})

// later on but before app ready
protocol = require('electron').protocol

This pull request eagerly requires protocol so that it is an earlier ready listener than anything loaded from the app's main script.

protocol was previously required eagerly by chrome-extension.js so this shouldn't impact performance.

Closes #6094

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Jun 23, 2016

👍

@zcbenz zcbenz merged commit 74a2b77 into master Jun 23, 2016

8 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #3507965 succeeded in 41s
Details
electron-linux-ia32 Build #3507966 succeeded in 37s
Details
electron-linux-x64 Build #3507967 succeeded in 122s
Details
electron-mas-x64 Build #1680 succeeded in 6 min 11 sec
Details
electron-osx-x64 Build #1688 succeeded in 6 min 12 sec
Details
electron-win-ia32 Build #681 succeeded in 6 min 5 sec
Details
electron-win-x64 Build #672 succeeded in 6 min 22 sec
Details

@zcbenz zcbenz deleted the eagerly-require-protocol branch Jun 23, 2016

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