Skip to content
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

protocol: respect requests from partition #4551

Merged
merged 2 commits into from
Feb 24, 2016

Conversation

deepak1556
Copy link
Member

Protocol module currently doesnt respect partitions. This just adds a fromPartition method similar to session, internally protocol is now wired as a property of session.

@deepak1556
Copy link
Member Author

@zcbenz any clue about why this crash happens https://travis-ci.org/atom/electron/jobs/110389798 , just made a temp fix. Would like resolve the original cause.

@zcbenz
Copy link
Contributor

zcbenz commented Feb 21, 2016

I don't think we need the protocol.fromPartition API, we can just explicitly document session.protocol and people will know how to use it for multi-session.

@zcbenz any clue about why this crash happens https://travis-ci.org/atom/electron/jobs/110389798 , just made a temp fix. Would like resolve the original cause.

I think it is because calling app.exit crashed the main process.

@deepak1556
Copy link
Member Author

Fixed, thanks!

const electron = require('electron');
const app = electron.app;
const path = require('path');
const protocol = session.fromPartition(partitionName).protocol;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating session before the ready event is not recommended, for now it is causing crash on exit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@zcbenz
Copy link
Contributor

zcbenz commented Feb 24, 2016

👍

zcbenz added a commit that referenced this pull request Feb 24, 2016
protocol: respect requests from partition
@zcbenz zcbenz merged commit a63193c into electron:master Feb 24, 2016
@zcbenz zcbenz mentioned this pull request Feb 24, 2016
zcbenz added a commit that referenced this pull request Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants