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

Shorten Socket path for makeSingleInstance in sandboxed apps #7566

Merged
merged 3 commits into from Oct 17, 2016

Conversation

Projects
None yet
2 participants
@paulcbetts
Contributor

paulcbetts commented Oct 11, 2016

This PR amends #5236 to work with apps that are sandboxed, non-MAS applications, by detecting dynamically whether we should apply the sandbox workaround instead of restricting it to the MAS build

@paulcbetts

This comment has been minimized.

Contributor

paulcbetts commented Oct 11, 2016

Verified that this works inside a sandboxed app (which is to say, it doesn't crash)

@@ -348,6 +348,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) {
return (cookie == ReadLink(path));
}
bool IsAppSandboxed() {
#if defined(OS_MACOSX)
// NB: There is no sane API for this, we have to just guess by

This comment has been minimized.

@zcbenz

zcbenz Oct 12, 2016

Contributor

Maybe just #if defined(MAS_BUILD)?

This comment has been minimized.

@paulcbetts

paulcbetts Oct 12, 2016

Contributor

That's the whole problem, if you're sandboxed but not using the MAS build (i.e. because you want to sandbox your app but hand it to people via a Zip file), this ifdef is incorrect

This comment has been minimized.

@zcbenz

zcbenz Oct 17, 2016

Contributor

That makes sense.

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Oct 17, 2016

👍

@zcbenz zcbenz merged commit cbe9768 into master Oct 17, 2016

6 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-mas-x64 Build #2603 succeeded in 9 min 7 sec
Details
electron-osx-x64 Build #2610 succeeded in 9 min 39 sec
Details
electron-win-ia32 Build #1699 succeeded in 8 min 5 sec
Details
electron-win-x64 Build #1674 succeeded in 8 min 8 sec
Details

@zcbenz zcbenz deleted the always-shorten-path branch Oct 17, 2016

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