Bug 1564832 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

browser.pages() will create Targets for all the available pages, and Page.create contains:
```javascript 
await Promise.all([
      client.send('Target.setAutoAttach', {autoAttach: true, waitForDebuggerOnStart: false}),
      client.send('Page.setLifecycleEventsEnabled', { enabled: true }),
      client.send('Network.enable', {}),
      client.send('Runtime.enable', {}),
      client.send('Security.enable', {}),
      client.send('Performance.enable', {}),
      client.send('Log.enable', {}),
    ]);
```

We hang on `client.send('Network.enable', {})`. When we try to create NetworkObserver in Network.enable we crash on 
```javascript
    const registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
    registrar.registerFactory(
      SINK_CLASS_ID,
      SINK_CLASS_DESCRIPTION,
      SINK_CONTRACT_ID,
      this._channelSinkFactory
    );
```
browser.pages() will create Targets for all the available pages, and Page.create contains:
```javascript 
await Promise.all([
      client.send('Target.setAutoAttach', {autoAttach: true, waitForDebuggerOnStart: false}),
      client.send('Page.setLifecycleEventsEnabled', { enabled: true }),
      client.send('Network.enable', {}),
      client.send('Runtime.enable', {}),
      client.send('Security.enable', {}),
      client.send('Performance.enable', {}),
      client.send('Log.enable', {}),
    ]);
```

We hang on `client.send('Network.enable', {})`. When we try to create NetworkObserver in Network.enable we crash on 
```javascript
    const registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
    registrar.registerFactory(
      SINK_CLASS_ID,
      SINK_CLASS_DESCRIPTION,
      SINK_CONTRACT_ID,
      this._channelSinkFactory
    );
```
https://searchfox.org/mozilla-central/rev/40ef22080910c2e2c27d9e2120642376b1d8b8b2/remote/domains/parent/network/NetworkObserver.jsm#73-79
browser.pages() will create Targets for all the available pages, and Page.create contains:
```javascript 
await Promise.all([
      client.send('Target.setAutoAttach', {autoAttach: true, waitForDebuggerOnStart: false}),
      client.send('Page.setLifecycleEventsEnabled', { enabled: true }),
      client.send('Network.enable', {}),
      client.send('Runtime.enable', {}),
      client.send('Security.enable', {}),
      client.send('Performance.enable', {}),
      client.send('Log.enable', {}),
    ]);
```
https://github.com/GoogleChrome/puppeteer/blob/v1.6.2/lib/Page.js#L48-L56

We hang on `client.send('Network.enable', {})`. When we try to create NetworkObserver in Network.enable we crash on 
```javascript
    const registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
    registrar.registerFactory(
      SINK_CLASS_ID,
      SINK_CLASS_DESCRIPTION,
      SINK_CONTRACT_ID,
      this._channelSinkFactory
    );
```
https://searchfox.org/mozilla-central/rev/40ef22080910c2e2c27d9e2120642376b1d8b8b2/remote/domains/parent/network/NetworkObserver.jsm#73-79

Back to Bug 1564832 Comment 2