fix(page): properly create isolated worlds (#4707)

The following error:
```
Error: Protocol error (Page.createIsolatedWorld): No frame for given id found
```

was mentioned here:
https://github.com/FlowCrypt/flowcrypt-browser/pull/1799#issuecomment-508729602

This indeed seems to be a bug with our creation of isolated worlds.
This commit is contained in:
Andrey Lushnikov 2019-07-15 17:52:40 -07:00 committed by GitHub
parent a39d553511
commit c9977c8004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@
*/
const EventEmitter = require('events');
const {helper, assert} = require('./helper');
const {helper, assert, debugError} = require('./helper');
const {Events} = require('./Events');
const {ExecutionContext, EVALUATION_SCRIPT_URL} = require('./ExecutionContext');
const {LifecycleWatcher} = require('./LifecycleWatcher');
@ -276,7 +276,7 @@ class FrameManager extends EventEmitter {
frameId: frame._id,
grantUniveralAccess: true,
worldName: name,
})));
}).catch(debugError))); // frames might be removed before we send this
}
/**