From a4bea62b98ba8d4db0b15fa91d17fdd304b6f174 Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Wed, 27 Mar 2019 11:35:01 -0700 Subject: [PATCH 01/30] fix: add missing buffer size check in nativeImage (#17569) --- atom/common/api/atom_api_native_image.cc | 130 ++++++++++++++--------- spec/api-native-image-spec.js | 17 +++ 2 files changed, 94 insertions(+), 53 deletions(-) diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 1356e4eb589c5..84253ed5c93ba 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -79,49 +79,71 @@ float GetScaleFactorFromOptions(mate::Arguments* args) { return scale_factor; } -bool AddImageSkiaRep(gfx::ImageSkia* image, - const unsigned char* data, - size_t size, - int width, - int height, - double scale_factor) { - auto decoded = std::make_unique(); +bool AddImageSkiaRepFromPNG(gfx::ImageSkia* image, + const unsigned char* data, + size_t size, + double scale_factor) { + SkBitmap bitmap; + if (!gfx::PNGCodec::Decode(data, size, &bitmap)) + return false; + + image->AddRepresentation(gfx::ImageSkiaRep(bitmap, scale_factor)); + return true; +} + +bool AddImageSkiaRepFromJPEG(gfx::ImageSkia* image, + const unsigned char* data, + size_t size, + double scale_factor) { + auto bitmap = gfx::JPEGCodec::Decode(data, size); + if (!bitmap) + return false; + + // `JPEGCodec::Decode()` doesn't tell `SkBitmap` instance it creates + // that all of its pixels are opaque, that's why the bitmap gets + // an alpha type `kPremul_SkAlphaType` instead of `kOpaque_SkAlphaType`. + // Let's fix it here. + // TODO(alexeykuzmin): This workaround should be removed + // when the `JPEGCodec::Decode()` code is fixed. + // See https://github.com/electron/electron/issues/11294. + bitmap->setAlphaType(SkAlphaType::kOpaque_SkAlphaType); + + image->AddRepresentation(gfx::ImageSkiaRep(*bitmap, scale_factor)); + return true; +} +bool AddImageSkiaRepFromBuffer(gfx::ImageSkia* image, + const unsigned char* data, + size_t size, + int width, + int height, + double scale_factor) { // Try PNG first. - if (!gfx::PNGCodec::Decode(data, size, decoded.get())) { - // Try JPEG. - decoded = gfx::JPEGCodec::Decode(data, size); - if (decoded) { - // `JPEGCodec::Decode()` doesn't tell `SkBitmap` instance it creates - // that all of its pixels are opaque, that's why the bitmap gets - // an alpha type `kPremul_SkAlphaType` instead of `kOpaque_SkAlphaType`. - // Let's fix it here. - // TODO(alexeykuzmin): This workaround should be removed - // when the `JPEGCodec::Decode()` code is fixed. - // See https://github.com/electron/electron/issues/11294. - decoded->setAlphaType(SkAlphaType::kOpaque_SkAlphaType); - } - } + if (AddImageSkiaRepFromPNG(image, data, size, scale_factor)) + return true; - if (!decoded) { - // Try Bitmap - if (width > 0 && height > 0) { - decoded.reset(new SkBitmap); - decoded->allocN32Pixels(width, height, false); - decoded->setPixels( - const_cast(reinterpret_cast(data))); - } else { - return false; - } - } + // Try JPEG second. + if (AddImageSkiaRepFromJPEG(image, data, size, scale_factor)) + return true; - image->AddRepresentation(gfx::ImageSkiaRep(*decoded, scale_factor)); + if (width == 0 || height == 0) + return false; + + auto info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType); + if (size < info.computeMinByteSize()) + return false; + + SkBitmap bitmap; + bitmap.allocN32Pixels(width, height, false); + bitmap.setPixels(const_cast(reinterpret_cast(data))); + + image->AddRepresentation(gfx::ImageSkiaRep(bitmap, scale_factor)); return true; } -bool AddImageSkiaRep(gfx::ImageSkia* image, - const base::FilePath& path, - double scale_factor) { +bool AddImageSkiaRepFromPath(gfx::ImageSkia* image, + const base::FilePath& path, + double scale_factor) { std::string file_contents; { base::ThreadRestrictions::ScopedAllowIO allow_io; @@ -132,7 +154,8 @@ bool AddImageSkiaRep(gfx::ImageSkia* image, const unsigned char* data = reinterpret_cast(file_contents.data()); size_t size = file_contents.size(); - return AddImageSkiaRep(image, data, size, 0, 0, scale_factor); + + return AddImageSkiaRepFromBuffer(image, data, size, 0, 0, scale_factor); } bool PopulateImageSkiaRepsFromPath(gfx::ImageSkia* image, @@ -141,12 +164,12 @@ bool PopulateImageSkiaRepsFromPath(gfx::ImageSkia* image, std::string filename(path.BaseName().RemoveExtension().AsUTF8Unsafe()); if (base::MatchPattern(filename, "*@*x")) // Don't search for other representations if the DPI has been specified. - return AddImageSkiaRep(image, path, GetScaleFactorFromPath(path)); + return AddImageSkiaRepFromPath(image, path, GetScaleFactorFromPath(path)); else - succeed |= AddImageSkiaRep(image, path, 1.0f); + succeed |= AddImageSkiaRepFromPath(image, path, 1.0f); for (const ScaleFactorPair& pair : kScaleFactorPairs) - succeed |= AddImageSkiaRep( + succeed |= AddImageSkiaRepFromPath( image, path.InsertBeforeExtensionASCII(pair.name), pair.scale); return succeed; } @@ -422,19 +445,20 @@ void NativeImage::AddRepresentation(const mate::Dictionary& options) { v8::Local buffer; GURL url; if (options.Get("buffer", &buffer) && node::Buffer::HasInstance(buffer)) { - AddImageSkiaRep( - &image_skia, - reinterpret_cast(node::Buffer::Data(buffer)), - node::Buffer::Length(buffer), width, height, scale_factor); - skia_rep_added = true; + auto* data = reinterpret_cast(node::Buffer::Data(buffer)); + auto size = node::Buffer::Length(buffer); + skia_rep_added = AddImageSkiaRepFromBuffer(&image_skia, data, size, width, + height, scale_factor); } else if (options.Get("dataURL", &url)) { std::string mime_type, charset, data; if (net::DataURL::Parse(url, &mime_type, &charset, &data)) { - if (mime_type == "image/png" || mime_type == "image/jpeg") { - AddImageSkiaRep(&image_skia, - reinterpret_cast(data.c_str()), - data.size(), width, height, scale_factor); - skia_rep_added = true; + auto* data_ptr = reinterpret_cast(data.c_str()); + if (mime_type == "image/png") { + skia_rep_added = AddImageSkiaRepFromPNG(&image_skia, data_ptr, + data.size(), scale_factor); + } else if (mime_type == "image/jpeg") { + skia_rep_added = AddImageSkiaRepFromJPEG(&image_skia, data_ptr, + data.size(), scale_factor); } } } @@ -525,9 +549,9 @@ mate::Handle NativeImage::CreateFromBuffer( } gfx::ImageSkia image_skia; - AddImageSkiaRep(&image_skia, - reinterpret_cast(node::Buffer::Data(buffer)), - node::Buffer::Length(buffer), width, height, scale_factor); + AddImageSkiaRepFromBuffer( + &image_skia, reinterpret_cast(node::Buffer::Data(buffer)), + node::Buffer::Length(buffer), width, height, scale_factor); return Create(args->isolate(), gfx::Image(image_skia)); } diff --git a/spec/api-native-image-spec.js b/spec/api-native-image-spec.js index a2876d732a54d..45c061f85ed7c 100644 --- a/spec/api-native-image-spec.js +++ b/spec/api-native-image-spec.js @@ -130,6 +130,11 @@ describe('nativeImage module', () => { expect(nativeImage.createFromBuffer(Buffer.from([])).isEmpty()) }) + it('returns an empty image when the buffer is too small', () => { + const image = nativeImage.createFromBuffer(Buffer.from([1, 2, 3, 4]), { width: 100, height: 100 }) + expect(image.isEmpty()).to.be.true() + }) + it('returns an image created from the given buffer', () => { const imageA = nativeImage.createFromPath(path.join(__dirname, 'fixtures', 'assets', 'logo.png')) @@ -450,6 +455,18 @@ describe('nativeImage module', () => { }) describe('addRepresentation()', () => { + it('does not add representation when the buffer is too small', () => { + const image = nativeImage.createEmpty() + + image.addRepresentation({ + buffer: Buffer.from([1, 2, 3, 4]), + width: 100, + height: 100 + }) + + expect(image.isEmpty()).to.be.true() + }) + it('supports adding a buffer representation for a scale factor', () => { const image = nativeImage.createEmpty() From 018fd925f45a1d969dc924a6cd3ddc657e23051e Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 27 Mar 2019 11:53:42 -0700 Subject: [PATCH 02/30] chore: update package-lock.json with updated version number --- package-lock.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d225f77bce56e..cc64a38e761b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.6", + "version": "3.1.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -156,6 +156,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1885,7 +1886,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", - "dev": true + "dev": true, + "optional": true }, "cssstyle": { "version": "0.2.37", @@ -5529,7 +5531,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "longest-streak": { "version": "2.0.2", From 4e5269b07631bedc0459915ca1ab97f04bd602be Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Wed, 27 Mar 2019 14:00:31 -0700 Subject: [PATCH 03/30] Bump v3.1.8 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 7 ++----- package.json | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index f45bee5e31db3..88fca7dd0425a 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.7 + 3.1.8 CFBundleShortVersionString - 3.1.7 + 3.1.8 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index dc535208e697f..5cabbc848cb7d 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,7,0 - PRODUCTVERSION 3,1,7,0 + FILEVERSION 3,1,8,0 + PRODUCTVERSION 3,1,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.7" + VALUE "FileVersion", "3.1.8" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.7" + VALUE "ProductVersion", "3.1.8" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index d5696f66a6f38..b74c27b4b324c 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 7 +#define ATOM_PATCH_VERSION 8 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index d38e73f6df34e..8e5067b9353f8 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.7', + 'version%': '3.1.8', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index cc64a38e761b0..b1625deac8a18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,7 +156,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1886,8 +1885,7 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", - "dev": true, - "optional": true + "dev": true }, "cssstyle": { "version": "0.2.37", @@ -5531,8 +5529,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "longest-streak": { "version": "2.0.2", diff --git a/package.json b/package.json index 882909361bb28..58c2a9652631a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.7", + "version": "3.1.8", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 5797a9d102382d38c7553296d32c368453176779 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Wed, 27 Mar 2019 14:22:02 -0700 Subject: [PATCH 04/30] Revert "Bump v3.1.8" This reverts commit 4e5269b07631bedc0459915ca1ab97f04bd602be. --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 7 +++++-- package.json | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 88fca7dd0425a..f45bee5e31db3 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.8 + 3.1.7 CFBundleShortVersionString - 3.1.8 + 3.1.7 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 5cabbc848cb7d..dc535208e697f 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,8,0 - PRODUCTVERSION 3,1,8,0 + FILEVERSION 3,1,7,0 + PRODUCTVERSION 3,1,7,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.8" + VALUE "FileVersion", "3.1.7" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.8" + VALUE "ProductVersion", "3.1.7" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index b74c27b4b324c..d5696f66a6f38 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 8 +#define ATOM_PATCH_VERSION 7 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index 8e5067b9353f8..d38e73f6df34e 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.8', + 'version%': '3.1.7', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index b1625deac8a18..cc64a38e761b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,6 +156,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1885,7 +1886,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", - "dev": true + "dev": true, + "optional": true }, "cssstyle": { "version": "0.2.37", @@ -5529,7 +5531,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "longest-streak": { "version": "2.0.2", diff --git a/package.json b/package.json index 58c2a9652631a..882909361bb28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.8", + "version": "3.1.7", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 761996ce460105209fd70bfad48cf8cafe2891ff Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 28 Mar 2019 08:59:09 -0700 Subject: [PATCH 05/30] Bump v3.1.8 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 7 ++----- package.json | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index f45bee5e31db3..88fca7dd0425a 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.7 + 3.1.8 CFBundleShortVersionString - 3.1.7 + 3.1.8 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index dc535208e697f..5cabbc848cb7d 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,7,0 - PRODUCTVERSION 3,1,7,0 + FILEVERSION 3,1,8,0 + PRODUCTVERSION 3,1,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.7" + VALUE "FileVersion", "3.1.8" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.7" + VALUE "ProductVersion", "3.1.8" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index d5696f66a6f38..b74c27b4b324c 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 7 +#define ATOM_PATCH_VERSION 8 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index d38e73f6df34e..8e5067b9353f8 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.7', + 'version%': '3.1.8', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index cc64a38e761b0..b1625deac8a18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,7 +156,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1886,8 +1885,7 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", - "dev": true, - "optional": true + "dev": true }, "cssstyle": { "version": "0.2.37", @@ -5531,8 +5529,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "longest-streak": { "version": "2.0.2", diff --git a/package.json b/package.json index 882909361bb28..58c2a9652631a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.7", + "version": "3.1.8", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 95ed0483310adea302f6e77f046e523bac600540 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 28 Mar 2019 09:50:30 -0700 Subject: [PATCH 06/30] Revert "Bump v3.1.8" This reverts commit 761996ce460105209fd70bfad48cf8cafe2891ff. --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 7 +++++-- package.json | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 88fca7dd0425a..f45bee5e31db3 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.8 + 3.1.7 CFBundleShortVersionString - 3.1.8 + 3.1.7 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 5cabbc848cb7d..dc535208e697f 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,8,0 - PRODUCTVERSION 3,1,8,0 + FILEVERSION 3,1,7,0 + PRODUCTVERSION 3,1,7,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.8" + VALUE "FileVersion", "3.1.7" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.8" + VALUE "ProductVersion", "3.1.7" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index b74c27b4b324c..d5696f66a6f38 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 8 +#define ATOM_PATCH_VERSION 7 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index 8e5067b9353f8..d38e73f6df34e 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.8', + 'version%': '3.1.7', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index b1625deac8a18..cc64a38e761b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,6 +156,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1885,7 +1886,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", - "dev": true + "dev": true, + "optional": true }, "cssstyle": { "version": "0.2.37", @@ -5529,7 +5531,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "longest-streak": { "version": "2.0.2", diff --git a/package.json b/package.json index 58c2a9652631a..882909361bb28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.8", + "version": "3.1.7", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 7b1160443510e03b07bce148f23f83f87dac687b Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Thu, 28 Mar 2019 12:56:17 -0700 Subject: [PATCH 07/30] fix: handle a race condition between preload scripts executing and navigations (#17595) There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes #17576 --- atom/browser/api/atom_api_web_contents.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 183bfdee3bb1c..0c96e1b98b207 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1150,6 +1150,9 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) { params.transition_type = ui::PAGE_TRANSITION_TYPED; params.should_clear_history_list = true; params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE; + // Discord non-committed entries to ensure that we don't re-use a pending + // entry + web_contents()->GetController().DiscardNonCommittedEntries(); web_contents()->GetController().LoadURLWithParams(params); // Set the background color of RenderWidgetHostView. From bbf5178d9f247592fb31989333bcc1032c2d4f86 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 28 Mar 2019 16:56:40 -0300 Subject: [PATCH 08/30] chore: bump node to get hotfix https://github.com/electron/node/pull/97 (#17592) --- vendor/node | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/node b/vendor/node index fcaf11a29c421..7658ffaaa38d2 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit fcaf11a29c421b0e76c9f24f5b155a53eff14e7f +Subproject commit 7658ffaaa38d2638ab3cc4c54d11349fd93c4682 From e84a6860e35e14b4031b88bb9b49841cdb89a305 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 28 Mar 2019 13:05:09 -0700 Subject: [PATCH 09/30] Bump v3.1.8 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 7 ++----- package.json | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index f45bee5e31db3..88fca7dd0425a 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.7 + 3.1.8 CFBundleShortVersionString - 3.1.7 + 3.1.8 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index dc535208e697f..5cabbc848cb7d 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,7,0 - PRODUCTVERSION 3,1,7,0 + FILEVERSION 3,1,8,0 + PRODUCTVERSION 3,1,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.7" + VALUE "FileVersion", "3.1.8" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.7" + VALUE "ProductVersion", "3.1.8" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index d5696f66a6f38..b74c27b4b324c 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 7 +#define ATOM_PATCH_VERSION 8 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index d38e73f6df34e..8e5067b9353f8 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.7', + 'version%': '3.1.8', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index cc64a38e761b0..b1625deac8a18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,7 +156,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1886,8 +1885,7 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", - "dev": true, - "optional": true + "dev": true }, "cssstyle": { "version": "0.2.37", @@ -5531,8 +5529,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "longest-streak": { "version": "2.0.2", diff --git a/package.json b/package.json index 882909361bb28..58c2a9652631a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.7", + "version": "3.1.8", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 87a71ed1ed7059bc1f372dd8c0d02359c00f64a9 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Fri, 12 Apr 2019 19:37:53 +0200 Subject: [PATCH 10/30] fix: report module name when require fails in sandboxed renderers (#17703) --- lib/sandboxed_renderer/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sandboxed_renderer/init.js b/lib/sandboxed_renderer/init.js index 2acb7db386363..cdc0cc2311dc3 100644 --- a/lib/sandboxed_renderer/init.js +++ b/lib/sandboxed_renderer/init.js @@ -72,7 +72,7 @@ function preloadRequire (module) { if (remoteModules.has(module)) { return require(module) } - throw new Error('module not found') + throw new Error(`module not found: ${module}`) } if (window.location.protocol === 'chrome-devtools:') { From aaad1edfe9eddb60f71c7c6a4f7fd3eb1c505820 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 16 Apr 2019 15:52:53 -0700 Subject: [PATCH 11/30] docs: note desktop audio limitation on macOS (#17816) --- docs/api/desktop-capturer.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/api/desktop-capturer.md b/docs/api/desktop-capturer.md index 7b897f2ad1bc9..b4642fa19ab95 100644 --- a/docs/api/desktop-capturer.md +++ b/docs/api/desktop-capturer.md @@ -93,3 +93,9 @@ objects, each `DesktopCapturerSource` represents a screen or an individual windo captured. [`navigator.mediaDevices.getUserMedia`]: https://developer.mozilla.org/en/docs/Web/API/MediaDevices/getUserMedia + +### Caveats + +`navigator.mediaDevices.getUserMedia` does not work on macOS for audio capture due to a fundamental limitation whereby apps that want to access the system's audio require a [signed kernel extension](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/KernelExtensions/KernelExtensions.html). Chromium, and by extension Electron, does not provide this. + +It is possible to circumvent this limitation by capturing system audio with another macOS app like Soundflower and passing it through a virtual audio input device. This virtual device can then be queried with `navigator.mediaDevices.getUserMedia`. \ No newline at end of file From f11ab9dac5776b4647929a89a407e31feb1bd149 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Wed, 17 Apr 2019 01:23:25 +0200 Subject: [PATCH 12/30] fix: emit process 'loaded' event in sandboxed renderers (#17809) --- atom/renderer/atom_sandboxed_renderer_client.cc | 2 ++ lib/sandboxed_renderer/api/ipc-renderer.js | 4 ++++ lib/sandboxed_renderer/init.js | 1 + spec/api-browser-window-spec.js | 13 +++++++++++++ spec/fixtures/module/preload-sandbox.js | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc index ce214162033ca..ae2412fd73974 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.cc +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -191,6 +191,8 @@ void AtomSandboxedRendererClient::DidCreateScriptContext( // Execute the function with proper arguments ignore_result( func->Call(context, v8::Null(isolate), node::arraysize(args), args)); + + InvokeIpcCallback(context, "onLoaded", std::vector>()); } void AtomSandboxedRendererClient::WillReleaseScriptContext( diff --git a/lib/sandboxed_renderer/api/ipc-renderer.js b/lib/sandboxed_renderer/api/ipc-renderer.js index 008372b4aa076..f984fd0da4032 100644 --- a/lib/sandboxed_renderer/api/ipc-renderer.js +++ b/lib/sandboxed_renderer/api/ipc-renderer.js @@ -13,6 +13,10 @@ ipcNative.onMessage = function (channel, args) { ipcRenderer.emit(channel, {sender: ipcRenderer}, ...args) } +ipcNative.onLoaded = function () { + process.emit('loaded') +} + ipcNative.onExit = function () { process.emit('exit') } diff --git a/lib/sandboxed_renderer/init.js b/lib/sandboxed_renderer/init.js index cdc0cc2311dc3..ccb9bc8a566bf 100644 --- a/lib/sandboxed_renderer/init.js +++ b/lib/sandboxed_renderer/init.js @@ -62,6 +62,7 @@ preloadProcess.execPath = process.execPath = binding.getExecPath() preloadProcess.platform = process.platform = platform preloadProcess.env = process.env = env +process.on('loaded', () => preloadProcess.emit('loaded')) process.on('exit', () => preloadProcess.emit('exit')) // This is the `require` function that will be visible to the preload script diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 4f59ff410e0bc..ed1458150993d 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1259,6 +1259,19 @@ describe('BrowserWindow module', () => { w.loadURL('file://' + path.join(fixtures, 'api', 'preload.html')) }) + it('exposes "loaded" event to preload script', function (done) { + w.destroy() + w = new BrowserWindow({ + show: false, + webPreferences: { + sandbox: true, + preload + } + }) + ipcMain.once('process-loaded', () => done()) + w.loadURL('about:blank') + }) + it('exposes "exit" event to preload script', function (done) { w.destroy() w = new BrowserWindow({ diff --git a/spec/fixtures/module/preload-sandbox.js b/spec/fixtures/module/preload-sandbox.js index b9042ec93c0cd..7596060e964a1 100644 --- a/spec/fixtures/module/preload-sandbox.js +++ b/spec/fixtures/module/preload-sandbox.js @@ -4,6 +4,11 @@ window.ipcRenderer = ipcRenderer window.setImmediate = setImmediate window.require = require + + process.once('loaded', () => { + ipcRenderer.send('process-loaded') + }) + if (location.protocol === 'file:') { window.test = 'preload' window.process = process From 15315ea91662768888aec45db787d52445839967 Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Tue, 16 Apr 2019 16:41:29 -0700 Subject: [PATCH 13/30] fix: reset the NSUserNotication handle on dismiss (#17820) --- brightray/browser/mac/cocoa_notification.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/brightray/browser/mac/cocoa_notification.mm b/brightray/browser/mac/cocoa_notification.mm index 154d00f87a571..6f15c9b153cba 100644 --- a/brightray/browser/mac/cocoa_notification.mm +++ b/brightray/browser/mac/cocoa_notification.mm @@ -115,6 +115,8 @@ NotificationDismissed(); this->LogAction("dismissed"); + + notification_.reset(nil); } void CocoaNotification::NotificationDisplayed() { From 7897913161e3918c04eae35a802630ccd88f024b Mon Sep 17 00:00:00 2001 From: Roller Bot <42361097+roller-bot@users.noreply.github.com> Date: Thu, 18 Apr 2019 08:37:05 -0700 Subject: [PATCH 14/30] chore: bump libcc (3-1-x) (#17850) * chore: bump libcc submodule to 83fd716a064b29c7a314f4e6b3447d8144d99035 * chore: bump libcc in DEPS to 83fd716a064b29c7a314f4e6b3447d8144d99035 --- DEPS | 2 +- vendor/libchromiumcontent | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d3d520fd92744..9042e4f918964 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ vars = { 'chromium_version': '63.0.3239.150', 'libchromiumcontent_revision': - 'bdb1c8e9d2f184ebeb75a25824aca0be27aa879b', + '83fd716a064b29c7a314f4e6b3447d8144d99035', 'node_version': 'v9.7.0-33-g538a5023af', 'native_mate_revision': diff --git a/vendor/libchromiumcontent b/vendor/libchromiumcontent index bdb1c8e9d2f18..83fd716a064b2 160000 --- a/vendor/libchromiumcontent +++ b/vendor/libchromiumcontent @@ -1 +1 @@ -Subproject commit bdb1c8e9d2f184ebeb75a25824aca0be27aa879b +Subproject commit 83fd716a064b29c7a314f4e6b3447d8144d99035 From 276ebca24cef50eb0ad405dfcc794e7738b55a01 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Thu, 18 Apr 2019 17:54:05 +0200 Subject: [PATCH 15/30] fix: copy pixels in AddImageSkiaRepFromBuffer (#17843) (#17861) --- atom/common/api/atom_api_native_image.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 84253ed5c93ba..b8c51e5b96232 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -135,7 +135,7 @@ bool AddImageSkiaRepFromBuffer(gfx::ImageSkia* image, SkBitmap bitmap; bitmap.allocN32Pixels(width, height, false); - bitmap.setPixels(const_cast(reinterpret_cast(data))); + bitmap.writePixels({info, data, bitmap.rowBytes()}); image->AddRepresentation(gfx::ImageSkiaRep(bitmap, scale_factor)); return true; From 14660a22957807f157de3a274820ad04012e754c Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Wed, 1 May 2019 10:34:43 -0700 Subject: [PATCH 16/30] Bump v3.1.9 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 88fca7dd0425a..b680513a24273 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.8 + 3.1.9 CFBundleShortVersionString - 3.1.8 + 3.1.9 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 5cabbc848cb7d..43a3371b1b19e 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,8,0 - PRODUCTVERSION 3,1,8,0 + FILEVERSION 3,1,9,0 + PRODUCTVERSION 3,1,9,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.8" + VALUE "FileVersion", "3.1.9" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.8" + VALUE "ProductVersion", "3.1.9" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index b74c27b4b324c..b24db458956a9 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 8 +#define ATOM_PATCH_VERSION 9 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index 8e5067b9353f8..73adec4982c66 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.8', + 'version%': '3.1.9', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index b1625deac8a18..3b012cdd298be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.7", + "version": "3.1.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 58c2a9652631a..9e110bc248158 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.8", + "version": "3.1.9", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 1e12291776cf2213be2bcd12feaaacd2ae236b10 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Wed, 29 May 2019 08:37:59 -0700 Subject: [PATCH 17/30] chore: bump libcc (3-1-x) (#18426) * chore: bump libcc submodule to 55625e1de5d34a815921975f4d5556133b8142af * chore: bump libcc in DEPS to 55625e1de5d34a815921975f4d5556133b8142af --- DEPS | 2 +- vendor/libchromiumcontent | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 9042e4f918964..77ba367045c0f 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ vars = { 'chromium_version': '63.0.3239.150', 'libchromiumcontent_revision': - '83fd716a064b29c7a314f4e6b3447d8144d99035', + '55625e1de5d34a815921975f4d5556133b8142af', 'node_version': 'v9.7.0-33-g538a5023af', 'native_mate_revision': diff --git a/vendor/libchromiumcontent b/vendor/libchromiumcontent index 83fd716a064b2..55625e1de5d34 160000 --- a/vendor/libchromiumcontent +++ b/vendor/libchromiumcontent @@ -1 +1 @@ -Subproject commit 83fd716a064b29c7a314f4e6b3447d8144d99035 +Subproject commit 55625e1de5d34a815921975f4d5556133b8142af From 5da219b14cae659fbd7a6a4a5f9bb3100694ce00 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Wed, 29 May 2019 08:40:07 -0700 Subject: [PATCH 18/30] Bump v3.1.10 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index b680513a24273..6c57b12848a79 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.9 + 3.1.10 CFBundleShortVersionString - 3.1.9 + 3.1.10 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 43a3371b1b19e..cd21c406350ec 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,9,0 - PRODUCTVERSION 3,1,9,0 + FILEVERSION 3,1,10,0 + PRODUCTVERSION 3,1,10,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.9" + VALUE "FileVersion", "3.1.10" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.9" + VALUE "ProductVersion", "3.1.10" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index b24db458956a9..a6faa3f444422 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 9 +#define ATOM_PATCH_VERSION 10 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index 73adec4982c66..de0f68e08144b 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.9', + 'version%': '3.1.10', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index 3b012cdd298be..5b0c232bba584 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.8", + "version": "3.1.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9e110bc248158..eca3fdeb8cc97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.9", + "version": "3.1.10", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 363d0dafc5e3fa73d5e06d269653b755b30d1521 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 30 May 2019 14:57:10 -0400 Subject: [PATCH 19/30] build: fixes for CI flakes (#18523) Turns off ELECTRON_ENABLE_LOGGING/ELECTRON_ENABLE_STACK_DUMPING in Windows as they are causing issues. In Linux, use a newer version of python-dbusmock to resolve dbusmock hanging on dbus_stop --- .circleci/config.yml | 8 +++++++- .circleci/fix-known-hosts.sh | 7 +++++++ .dockerignore | 1 + Dockerfile | 14 ++++++++++---- appveyor.yml | 2 ++ 5 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 .circleci/fix-known-hosts.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index b6a02947b9a53..02b48aff34041 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,11 @@ build-steps: &build-steps steps: + - run: + name: Fix Known Hosts on Linux + command: | + if [ "`uname`" == "Linux" ]; then + /home/builduser/fix-known-hosts.sh + fi - checkout - run: name: Install Node.js 10 on MacOS @@ -138,7 +144,7 @@ build-steps: &build-steps build-defaults: &build-defaults docker: - - image: electronbuilds/electron:0.0.8 + - image: electronbuilds/electron:0.0.8.1 <<: *build-steps version: 2 diff --git a/.circleci/fix-known-hosts.sh b/.circleci/fix-known-hosts.sh new file mode 100644 index 0000000000000..01e9ffe8abb95 --- /dev/null +++ b/.circleci/fix-known-hosts.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +mkdir -p ~/.ssh +echo "|1|cVeiko0f+NcBdQ4UQvusKHo8sOA=|VIYt+cwPlbV0iP9VItsw/wlzrEk= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== +|1|WDYl7KHWaZFGMa3eqg3iY4KmwzQ=|FWZq//rIJ3lr85ZeTr66c80iLiA= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts diff --git a/.dockerignore b/.dockerignore index 2e67a161a9804..dee39103c3ad6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ * !tools/xvfb-init.sh !tools/run-electron.sh +!.circleci/fix-known-hosts.sh diff --git a/Dockerfile b/Dockerfile index 74e5eeedea9be..6a5b5468ae3a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,7 @@ FROM electronbuilds/libchromiumcontent:0.0.4 USER root # Set up HOME directory -ENV HOME=/home -RUN chmod a+rwx /home +ENV HOME=/home/builduser # Install node.js RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - @@ -13,8 +12,9 @@ RUN apt-get install -y nodejs # Install wget used by crash reporter RUN apt-get install -y wget -# Install python-dbusmock -RUN apt-get install -y python-dbusmock +# Install python-dbus +RUN apt-get install -y python-dbus +RUN pip install python-dbusmock # Install libnotify RUN apt-get install -y libnotify-bin @@ -22,3 +22,9 @@ RUN apt-get install -y libnotify-bin # Add xvfb init script ADD tools/xvfb-init.sh /etc/init.d/xvfb RUN chmod a+x /etc/init.d/xvfb + +COPY .circleci/fix-known-hosts.sh /home/builduser/fix-known-hosts.sh +RUN chmod a+x /home/builduser/fix-known-hosts.sh + +USER builduser +WORKDIR /home/builduser diff --git a/appveyor.yml b/appveyor.yml index 1310b77c79b9f..a4fe772356d1c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -44,6 +44,8 @@ test_script: Write-Output "Skipping tests for release build" } else { $env:RUN_TESTS="true" + Remove-Item Env:\ELECTRON_ENABLE_LOGGING + Remove-Item Env:\ELECTRON_ENABLE_STACK_DUMPING Write-Output "Running tests for debug build" } - if "%RUN_TESTS%"=="true" ( echo Running test suite & python script\test.py --ci --rebuild_native_modules) From 93655d67b38697259f560208c3ca763354cc4681 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 4 Jun 2019 12:04:53 -0400 Subject: [PATCH 20/30] build: move Windows release builds to AppVeyor cloud (#18627) * build: move Windows release builds to AppVeyor cloud * Use new env variable for AppVeyor cloud server (cherry picked from commit ca712150a396021bdf04c40cce230d6e11a4ddd0) --- .env.example | 2 +- script/ci-release-build.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index c2af9cb1f737c..533a36ca683b4 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,7 @@ # These env vars are only necessary for creating Electron releases. # See docs/development/releasing.md -APPVEYOR_TOKEN= +APPVEYOR_CLOUD_TOKEN= CIRCLE_TOKEN= ELECTRON_GITHUB_TOKEN= VSTS_TOKEN= diff --git a/script/ci-release-build.js b/script/ci-release-build.js index 5b3c17946bc4f..61efdfaa42c3c 100644 --- a/script/ci-release-build.js +++ b/script/ci-release-build.js @@ -2,11 +2,11 @@ require('dotenv-safe').load() const assert = require('assert') const request = require('request') -const buildAppVeyorURL = 'https://windows-ci.electronjs.org/api/builds' +const buildAppVeyorURL = 'https://ci.appveyor.com/api/builds' const appVeyorJobs = { - 'electron-x64': 'electron', - 'electron-ia32': 'electron-39ng6' + 'electron-x64': 'electron-x64-release', + 'electron-ia32': 'electron-ia32-release' } const circleCIJobs = [ @@ -104,13 +104,13 @@ async function callAppVeyor (targetBranch, job, options) { const requestOpts = { url: buildAppVeyorURL, auth: { - bearer: process.env.APPVEYOR_TOKEN + bearer: process.env.APPVEYOR_CLOUD_TOKEN }, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ - accountName: 'AppVeyor', + accountName: 'electron-bot', projectSlug: appVeyorJobs[job], branch: targetBranch, environmentVariables @@ -120,7 +120,7 @@ async function callAppVeyor (targetBranch, job, options) { let appVeyorResponse = await makeRequest(requestOpts, true).catch(err => { console.log('Error calling AppVeyor:', err) }) - const buildUrl = `https://windows-ci.electronjs.org/project/AppVeyor/${appVeyorJobs[job]}/build/${appVeyorResponse.version}` + const buildUrl = `https://ci.appveyor.com/project/electron-bot/${appVeyorJobs[job]}/build/${appVeyorResponse.version}` console.log(`AppVeyor release build request for ${job} successful. Check build status at ${buildUrl}`) } From 516233c0daf0ac72f627d580a07dfa04e527b25c Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Thu, 6 Jun 2019 19:11:41 +0200 Subject: [PATCH 21/30] fix: emit IPC event in correct context if isolation and sandbox enabled (#16352) (#18668) * fix: emit IPC event in correct context if isolation and sandbox enabled IPC events were not being delivered to renderer processes when both `contextIsolation` and `sandbox` were enabled. This is because the `AtomSandboxedRenderFrameObserver` class was incorrectly using the `MainWorldScriptContext`, rather than conditionally selecting the context based on if isolation was enabled. Fixes #11922 --- .../atom_sandboxed_renderer_client.cc | 4 ++- spec/api-ipc-renderer-spec.js | 35 +++++++++++++------ spec/fixtures/module/preload-inject-ipc.js | 2 -- spec/fixtures/module/preload-ipc-ping-pong.js | 5 +++ spec/fixtures/pages/ping-pong.html | 11 ------ 5 files changed, 33 insertions(+), 24 deletions(-) delete mode 100644 spec/fixtures/module/preload-inject-ipc.js create mode 100644 spec/fixtures/module/preload-ipc-ping-pong.js delete mode 100644 spec/fixtures/pages/ping-pong.html diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc index ae2412fd73974..9784cb1ed7f85 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.cc +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -125,8 +125,10 @@ class AtomSandboxedRenderFrameObserver : public AtomRenderFrameObserver { auto* isolate = blink::MainThreadIsolate(); v8::HandleScope handle_scope(isolate); - auto context = frame->MainWorldScriptContext(); + + auto context = renderer_client_->GetContext(frame, isolate); v8::Context::Scope context_scope(context); + v8::Local argv[] = {mate::ConvertToV8(isolate, channel), mate::ConvertToV8(isolate, args)}; renderer_client_->InvokeIpcCallback( diff --git a/spec/api-ipc-renderer-spec.js b/spec/api-ipc-renderer-spec.js index 748851ec1c0a7..411c560c20233 100644 --- a/spec/api-ipc-renderer-spec.js +++ b/spec/api-ipc-renderer-spec.js @@ -140,20 +140,35 @@ describe('ipc renderer module', () => { contents = null }) - it('sends message to WebContents', done => { - const webContentsId = remote.getCurrentWebContents().id + const generateSpecs = (description, webPreferences) => { + describe(description, () => { + it('sends message to WebContents', done => { + contents = webContents.create({ + preload: path.join(fixtures, 'module', 'preload-ipc-ping-pong.js'), + ...webPreferences + }) - ipcRenderer.once('pong', (event, id) => { - expect(webContentsId).to.equal(id) - done() - }) + const payload = 'Hello World!' + const webContentsId = remote.getCurrentWebContents().id + + ipcRenderer.once('pong', (event, data) => { + expect(payload).to.equal(data) + done() + }) - contents.once('did-finish-load', () => { - ipcRenderer.sendTo(contents.id, 'ping', webContentsId) + contents.once('did-finish-load', () => { + ipcRenderer.sendTo(contents.id, 'ping', webContentsId, payload) + }) + + contents.loadFile(path.join(fixtures, 'pages', 'base-page.html')) + }) }) + } - contents.loadURL(`file://${path.join(fixtures, 'pages', 'ping-pong.html')}`) - }) + generateSpecs('without sandbox', {}) + generateSpecs('with sandbox', { sandbox: true }) + generateSpecs('with contextIsolation', { contextIsolation: true }) + generateSpecs('with contextIsolation + sandbox', { contextIsolation: true, sandbox: true }) }) describe('remote listeners', () => { diff --git a/spec/fixtures/module/preload-inject-ipc.js b/spec/fixtures/module/preload-inject-ipc.js deleted file mode 100644 index 3475cd69a636d..0000000000000 --- a/spec/fixtures/module/preload-inject-ipc.js +++ /dev/null @@ -1,2 +0,0 @@ -const {ipcRenderer} = require('electron') -window.ipcRenderer = ipcRenderer diff --git a/spec/fixtures/module/preload-ipc-ping-pong.js b/spec/fixtures/module/preload-ipc-ping-pong.js new file mode 100644 index 0000000000000..d1ee12cc13623 --- /dev/null +++ b/spec/fixtures/module/preload-ipc-ping-pong.js @@ -0,0 +1,5 @@ +const { ipcRenderer } = require('electron') + +ipcRenderer.on('ping', function (event, senderId, payload) { + ipcRenderer.sendTo(senderId, 'pong', payload) +}) diff --git a/spec/fixtures/pages/ping-pong.html b/spec/fixtures/pages/ping-pong.html deleted file mode 100644 index d10e7898653b1..0000000000000 --- a/spec/fixtures/pages/ping-pong.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - From 024cb4afd9cebe9a1bf1976ba83c3cdce1a5afd7 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 6 Jun 2019 10:15:16 -0700 Subject: [PATCH 22/30] Bump v3.1.11 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 9 ++++++--- package.json | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 6c57b12848a79..fbb8ebb2cdb9a 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.10 + 3.1.11 CFBundleShortVersionString - 3.1.10 + 3.1.11 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index cd21c406350ec..9f424cf3ade62 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,10,0 - PRODUCTVERSION 3,1,10,0 + FILEVERSION 3,1,11,0 + PRODUCTVERSION 3,1,11,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.10" + VALUE "FileVersion", "3.1.11" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.10" + VALUE "ProductVersion", "3.1.11" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index a6faa3f444422..6af9378c9ff70 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 10 +#define ATOM_PATCH_VERSION 11 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index de0f68e08144b..c4001eddbadfb 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.10', + 'version%': '3.1.11', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index 5b0c232bba584..80e34555f575d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.9", + "version": "3.1.10", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -156,6 +156,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1885,7 +1886,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", - "dev": true + "dev": true, + "optional": true }, "cssstyle": { "version": "0.2.37", @@ -5529,7 +5531,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "longest-streak": { "version": "2.0.2", diff --git a/package.json b/package.json index eca3fdeb8cc97..2724a9264b24f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.10", + "version": "3.1.11", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 77e18b546e6660015931b06cbae5d02fa0bcd509 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Sat, 15 Jun 2019 09:23:02 +0200 Subject: [PATCH 23/30] fix: crash in BrowserWindow destructor after win.webContents.destroy() (#18686) (#18796) --- atom/browser/api/atom_api_browser_window.cc | 6 ++++-- atom/browser/api/atom_api_browser_window.h | 2 +- atom/browser/api/atom_api_web_contents.cc | 8 +++++--- atom/browser/api/atom_api_web_contents.h | 4 ++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/atom/browser/api/atom_api_browser_window.cc b/atom/browser/api/atom_api_browser_window.cc index cab94da8a910b..930247f006b70 100644 --- a/atom/browser/api/atom_api_browser_window.cc +++ b/atom/browser/api/atom_api_browser_window.cc @@ -64,7 +64,7 @@ BrowserWindow::BrowserWindow(v8::Isolate* isolate, } web_contents_.Reset(isolate, web_contents.ToV8()); - api_web_contents_ = web_contents.get(); + api_web_contents_ = web_contents->GetWeakPtr(); api_web_contents_->AddObserver(this); Observe(api_web_contents_->web_contents()); @@ -95,7 +95,9 @@ BrowserWindow::BrowserWindow(v8::Isolate* isolate, } BrowserWindow::~BrowserWindow() { - api_web_contents_->RemoveObserver(this); + // FIXME This is a hack rather than a proper fix preventing shutdown crashes. + if (api_web_contents_) + api_web_contents_->RemoveObserver(this); // Note that the OnWindowClosed will not be called after the destructor runs, // since the window object is managed by the TopLevelWindow class. if (web_contents()) diff --git a/atom/browser/api/atom_api_browser_window.h b/atom/browser/api/atom_api_browser_window.h index 770181f5b7f4e..6f350a5dfa2e5 100644 --- a/atom/browser/api/atom_api_browser_window.h +++ b/atom/browser/api/atom_api_browser_window.h @@ -112,7 +112,7 @@ class BrowserWindow : public TopLevelWindow, #endif v8::Global web_contents_; - api::WebContents* api_web_contents_; + base::WeakPtr api_web_contents_; base::WeakPtrFactory weak_factory_; diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 0c96e1b98b207..060ee46e77261 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -312,7 +312,9 @@ struct WebContents::FrameDispatchHelper { WebContents::WebContents(v8::Isolate* isolate, content::WebContents* web_contents, Type type) - : content::WebContentsObserver(web_contents), type_(type) { + : content::WebContentsObserver(web_contents), + type_(type), + weak_factory_(this) { const mate::Dictionary options = mate::Dictionary::CreateEmpty(isolate); if (type == REMOTE) { web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent()); @@ -326,8 +328,8 @@ WebContents::WebContents(v8::Isolate* isolate, } } -WebContents::WebContents(v8::Isolate* isolate, - const mate::Dictionary& options) { +WebContents::WebContents(v8::Isolate* isolate, const mate::Dictionary& options) + : weak_factory_(this) { // Read options. options.Get("backgroundThrottling", &background_throttling_); diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index e913c4b644e98..e832cd669548e 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -99,6 +99,8 @@ class WebContents : public mate::TrackableObject, static int64_t GetIDForContents(content::WebContents* web_contents); + base::WeakPtr GetWeakPtr() { return weak_factory_.GetWeakPtr(); } + // Notifies to destroy any guest web contents before destroying self. void DestroyWebContents(bool async); @@ -469,6 +471,8 @@ class WebContents : public mate::TrackableObject, // Observers of this WebContents. base::ObserverList observers_; + base::WeakPtrFactory weak_factory_; + DISALLOW_COPY_AND_ASSIGN(WebContents); }; From 4c409c4651779e57b13d1f8e7abc4523105398df Mon Sep 17 00:00:00 2001 From: Keerthi Niranjan Date: Thu, 11 Jul 2019 20:00:15 +0530 Subject: [PATCH 24/30] revert: notification handle reset on dismissal (#19163) --- brightray/browser/mac/cocoa_notification.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/brightray/browser/mac/cocoa_notification.mm b/brightray/browser/mac/cocoa_notification.mm index 6f15c9b153cba..154d00f87a571 100644 --- a/brightray/browser/mac/cocoa_notification.mm +++ b/brightray/browser/mac/cocoa_notification.mm @@ -115,8 +115,6 @@ NotificationDismissed(); this->LogAction("dismissed"); - - notification_.reset(nil); } void CocoaNotification::NotificationDisplayed() { From 18e47e7af03c9c65256209094aeeb09bd6db5822 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 11 Jul 2019 08:50:07 -0700 Subject: [PATCH 25/30] chore: update @types/node version for 3-1-x (#18283) --- npm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/package.json b/npm/package.json index 788f4681727fa..bfa4280c8ab84 100644 --- a/npm/package.json +++ b/npm/package.json @@ -11,7 +11,7 @@ "main": "index.js", "types": "electron.d.ts", "dependencies": { - "@types/node": "^8.0.24", + "@types/node": "^10.1.4", "electron-download": "^4.1.0", "extract-zip": "^1.0.3" }, From c3ab28f71e02ec5663eaa4ddda5ed61e7061c675 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 11 Jul 2019 08:58:07 -0700 Subject: [PATCH 26/30] Bump v3.1.12 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index fbb8ebb2cdb9a..656c27962161e 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.11 + 3.1.12 CFBundleShortVersionString - 3.1.11 + 3.1.12 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 9f424cf3ade62..52dce6c19f731 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,11,0 - PRODUCTVERSION 3,1,11,0 + FILEVERSION 3,1,12,0 + PRODUCTVERSION 3,1,12,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.11" + VALUE "FileVersion", "3.1.12" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.11" + VALUE "ProductVersion", "3.1.12" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index 6af9378c9ff70..9619b9e0fdb0c 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 11 +#define ATOM_PATCH_VERSION 12 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index c4001eddbadfb..8f03e92079739 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.11', + 'version%': '3.1.12', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index 80e34555f575d..ca56efac07c08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.10", + "version": "3.1.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2724a9264b24f..f403f9bd0c6f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.11", + "version": "3.1.12", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 22f18772867031b50cea42ab155713d0c11f00e5 Mon Sep 17 00:00:00 2001 From: Micha Hanselmann Date: Tue, 30 Jul 2019 08:38:13 -0700 Subject: [PATCH 27/30] docs: fix bad link in notifications tut (#19395) --- docs/tutorial/notifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/notifications.md b/docs/tutorial/notifications.md index 177bfa03503b5..90f11e1ab4858 100644 --- a/docs/tutorial/notifications.md +++ b/docs/tutorial/notifications.md @@ -36,7 +36,7 @@ Electron is used together with the installation and update framework Squirrel, [shortcuts will automatically be set correctly][squirrel-events]. Furthermore, Electron will detect that Squirrel was used and will automatically call `app.setAppUserModelId()` with the correct value. During development, you may have -to call [`app.setAppUserModelId()`][[set-app-user-model-id]] yourself. +to call [`app.setAppUserModelId()`][set-app-user-model-id] yourself. Furthermore, in Windows 8, the maximum length for the notification body is 250 characters, with the Windows team recommending that notifications should be kept From 3cb9d42b81bacf1315f82da963844f6d67902b77 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Tue, 30 Jul 2019 08:41:35 -0700 Subject: [PATCH 28/30] Bump v3.1.13 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 656c27962161e..c9f6d983d825d 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.12 + 3.1.13 CFBundleShortVersionString - 3.1.12 + 3.1.13 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 52dce6c19f731..8a32960e12cfc 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,12,0 - PRODUCTVERSION 3,1,12,0 + FILEVERSION 3,1,13,0 + PRODUCTVERSION 3,1,13,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.12" + VALUE "FileVersion", "3.1.13" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.12" + VALUE "ProductVersion", "3.1.13" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index 9619b9e0fdb0c..c2ee8ae4d22a5 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 12 +#define ATOM_PATCH_VERSION 13 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index 8f03e92079739..58cb38eefaafd 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.12', + 'version%': '3.1.13', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index ca56efac07c08..b0ee93ff4e833 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.11", + "version": "3.1.12", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f403f9bd0c6f6..4cdb3bcb6019c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.12", + "version": "3.1.13", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 71f65da9e6dc1ab735613152aa39b780daffac44 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Tue, 30 Jul 2019 08:57:48 -0700 Subject: [PATCH 29/30] Revert "Bump v3.1.13" This reverts commit 3cb9d42b81bacf1315f82da963844f6d67902b77. --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index c9f6d983d825d..656c27962161e 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.13 + 3.1.12 CFBundleShortVersionString - 3.1.13 + 3.1.12 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 8a32960e12cfc..52dce6c19f731 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,13,0 - PRODUCTVERSION 3,1,13,0 + FILEVERSION 3,1,12,0 + PRODUCTVERSION 3,1,12,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.13" + VALUE "FileVersion", "3.1.12" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.13" + VALUE "ProductVersion", "3.1.12" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index c2ee8ae4d22a5..9619b9e0fdb0c 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 13 +#define ATOM_PATCH_VERSION 12 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index 58cb38eefaafd..8f03e92079739 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.13', + 'version%': '3.1.12', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index b0ee93ff4e833..ca56efac07c08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.12", + "version": "3.1.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4cdb3bcb6019c..f403f9bd0c6f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.13", + "version": "3.1.12", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { From 93fdeae2e7714947318f69e702d11e96d8e1de42 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Tue, 30 Jul 2019 09:01:54 -0700 Subject: [PATCH 30/30] Bump v3.1.13 --- atom/browser/resources/mac/Info.plist | 4 ++-- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- electron.gyp | 2 +- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 656c27962161e..c9f6d983d825d 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 3.1.12 + 3.1.13 CFBundleShortVersionString - 3.1.12 + 3.1.13 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 52dce6c19f731..8a32960e12cfc 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,12,0 - PRODUCTVERSION 3,1,12,0 + FILEVERSION 3,1,13,0 + PRODUCTVERSION 3,1,13,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "3.1.12" + VALUE "FileVersion", "3.1.13" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "3.1.12" + VALUE "ProductVersion", "3.1.13" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index 9619b9e0fdb0c..c2ee8ae4d22a5 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 3 #define ATOM_MINOR_VERSION 1 -#define ATOM_PATCH_VERSION 12 +#define ATOM_PATCH_VERSION 13 // #define ATOM_PRE_RELEASE_VERSION #ifndef ATOM_STRINGIFY diff --git a/electron.gyp b/electron.gyp index 8f03e92079739..58cb38eefaafd 100644 --- a/electron.gyp +++ b/electron.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '3.1.12', + 'version%': '3.1.13', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ diff --git a/package-lock.json b/package-lock.json index ca56efac07c08..b0ee93ff4e833 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.11", + "version": "3.1.12", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f403f9bd0c6f6..4cdb3bcb6019c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "3.1.12", + "version": "3.1.13", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": {