allow protocol module initialization before app ready.

* ensure registerStandardSchemes can only be called before app ready
 * ensure other protocol methods can only be used after app ready
This commit is contained in:
deepak1556 2016-05-08 00:13:23 +05:30
parent 1ff33b7c81
commit 0f2ae385ed
5 changed files with 66 additions and 25 deletions

View file

@ -1,9 +1,3 @@
const app = require('electron').app
if (!app.isReady()) {
throw new Error('Can not initialize protocol module before app is ready')
}
const protocol = process.atomBinding('protocol').protocol
// Warn about removed APIs.