Граф коммитов

376 Коммитов

Автор SHA1 Сообщение Дата
Cheng Zhao 0ab9cc30d2
refactor: pass base::Value by value in JS API implementations (#20809)
* refactor: move the arg instead of const reference it

* refactor: avoid unnecessary copies of base::Value in arg

* refactor: pass-by-value in dict_util

* refactor: avoid unnecessary reference
2019-10-30 14:30:59 +09:00
Shelley Vohr 5d00494f8d
fix: do not DCHECK non-const methods (#20833) 2019-10-29 13:35:38 -07:00
Electron Bot 79d3901859 Bump v8.0.0-nightly.20191029 2019-10-29 08:31:39 -07:00
Milan Burda 0f7ebff81e fix: pass frameId to v8Util.setRemoteCallbackFreer() (#20732) 2019-10-29 15:40:09 +09:00
Electron Bot b6246dcf12 chore: bump chromium to f5b345dd470f14eef6e44732ccf23 (master) (#20649) 2019-10-28 15:12:35 -07:00
Shelley Vohr fb8b1fd1c9 fix: prevent menu gc during popup (#20745) 2019-10-28 14:26:48 -04:00
Electron Bot d0cdd12521 Bump v8.0.0-nightly.20191028 2019-10-28 08:31:41 -07:00
Electron Bot e8d85b6ded Bump v8.0.0-nightly.20191027 2019-10-27 08:31:07 -07:00
Electron Bot 8f1ad8a4e5 Bump v8.0.0-nightly.20191026 2019-10-26 08:32:27 -07:00
Electron Bot 4ec6d10969 Bump v8.0.0-nightly.20191025 2019-10-25 08:31:50 -07:00
Cheng Zhao 0fe6767d6b
chore: remove native_mate (Part 11) (#20719)
* refactor: convert Menu and globalShortcut to gin

* refactor: convert api::Cookies to gin

* refactor: convert View and WebContentsView to gin

* refactor: convert WebContents related classes to gin

* refactor: convert powerMonitor to gin

* refactor: prepare for header change

* refactor: remove last uses of mate::EventEmitter

* refactor: remove mate::EventEmitter

* refactor: move trackable_object to gin_helper

* fix: custom converter should not use Handle

* fix: no more need to check if icon is empty

It was a bug that the Handle<NativeImage> can be non-empty when the
image file does not exist. The bug was caused by the converter code
writing out the image even when the convertion fails.

The bug was work-arounded by adding an additional check, but since the
original bug had been fixed, the additional check is no longer needed.

* fix: should always set frameId even when callback is null

* fix: do not mix gin/mate handles for NativeImage
2019-10-25 22:03:28 +09:00
Electron Bot e196a397ad Bump v8.0.0-nightly.20191024 2019-10-24 08:32:48 -07:00
CezaryKulakowski 510a916f82 fix: return proper values for WM_GETMINMAXINFO (#20519)
* fix: set proper constraints for windows with defined maxWidth

When BrowserWindow has set constraints for width (max or min) it
won't behave correctly during first attempt of resizing it. When
maxWidth is defined and maxWidth equals its width it will shrink
rapidly when user tries to expand its width. On the other hand
when minWidth is defined and minWidth equals its width it's
possible to decrease its width with a few pixels.

Notes: Fixed improper behaviour of window with width constraint set during resize.

* fix: prevent crash when WM_GETMINMAXINFO is called on initing window
2019-10-24 15:06:04 +09:00
Cheng Zhao be955a9721
chore: remove native_mate (Part 10) (#20696)
* refactor: remove direct uses of event_emitter_deprecated.h

* refactor: remove event_emitter_deprecated.h in api::App

* refactor: use std::move to save a copy

* fix: windows and linux builds
2019-10-24 14:47:58 +09:00
Jeremy Apthorp 77414813b4 chore: remove _ns suffixes (#20691)
* chore: remove _ns suffixes

* lint
2019-10-24 09:51:06 +09:00
Shelley Vohr db4d01c517
refactor: move CompileAndCall to a helper (#20675) 2019-10-23 09:26:32 -07:00
Electron Bot 18907389da Bump v8.0.0-nightly.20191023 2019-10-23 08:32:02 -07:00
Jeremy Apthorp 2abea22b4b fix: explicitly cancel redirects when mode is 'error' (#20686) 2019-10-23 09:10:37 +09:00
Jeremy Apthorp cde2aae6b5
fix: properly free remote objects (#20671) 2019-10-22 16:54:38 -07:00
Electron Bot 2658cae3ea Bump v8.0.0-nightly.20191022 2019-10-22 08:31:48 -07:00
Shelley Vohr aa26e8b946
fix: macOS getColor inconsistencies (#20611) 2019-10-21 14:31:03 -07:00
Shelley Vohr 9a5cd4c8d2
fix: use xib file to construct macOS Menu (#20615) 2019-10-21 14:11:09 -07:00
Electron Bot 417f9e27e1 Bump v8.0.0-nightly.20191021 2019-10-21 08:32:10 -07:00
Cheng Zhao eb0e55c514
chore: remove native_mate (Part 9) (#20645)
* refactor: remove a few uses of native_mate/gfx_converter.h

* refactor: deprecate mate::EventEmitter

* refactor: add gin_helper::EventEmitter

* refactor: convert a few classes to use gin_helper::EventEmitter

* refactor: get rid of native_mate_converters/gfx_converter.h

* fix: follow native_mate on reporting errors

* fix: gin is weak at guessing parameter types

* fix: incorrect full class name

* fix: gin::Handle does not accept null
2019-10-21 16:05:40 +09:00
Electron Bot 820dab295f Bump v8.0.0-nightly.20191020 2019-10-20 08:31:06 -07:00
Electron Bot 956127ee5e Bump v8.0.0-nightly.20191019 2019-10-19 08:31:24 -07:00
Electron Bot 3ac3fbdbfb chore: bump chromium to e049d599a8332b9b2785b0178be74 (master) (#20314) 2019-10-18 12:57:34 -07:00
Samuel Attard 0090616f7b
feat: add a new contextBridge module (#20307)
* feat: add a new contextBridge module

* chore: fix docs linting

* feat: add support for function arguments being proxied

* chore: ensure that contextBridge can only be used when contextIsolation is enabled

* docs: getReverseBinding can be null

* docs: fix broken links in md file

* feat: add support for promises in function parameters

* fix: linting failure for explicit constructor

* Update atom_api_context_bridge.cc

* chore: update docs and API design as per feedback

* refactor: remove reverse bindings and handle GC'able functions across the bridge

* chore: only expose debugGC in testing builds

* fix: do not proxy promises as objects

* spec: add complete spec coverage for contextBridge

* spec: add tests for null/undefined and the anti-overwrite logic

* chore: fix linting

* spec: add complex nested back-and-forth function calling

* fix: expose contextBridge in sandboxed renderers

* refactor: improve security of default_app using the new contextBridge module

* s/bindAPIInMainWorld/exposeInMainWorld

* chore: sorry for this commit, its a big one, I fixed like everything and refactored a lot

* chore: remove PassedValueCache as it is unused now

Values transferred from context A to context B are now cachde in the RenderFramePersistenceStore

* chore: move to anonymous namespace

* refactor: remove PassValueToOtherContextWithCache

* chore: remove commented unused code blocks

* chore: remove .only

* chore: remote commented code

* refactor: extract RenderFramePersistenceStore

* spec: ensure it works with numbered keys

* fix: handle number keys correctly

* fix: sort out the linter

* spec: update default_app asar spec for removed file

* refactor: change signatures to return v8 objects directly rather than the mate dictionary handle

* refactor: use the v8 serializer to support cloneable buffers and other object types

* chore: fix linting

* fix: handle hash collisions with a linked list in the map

* fix: enforce a recursion limit on the context bridge

* chore: fix linting

* chore: remove TODO

* chore: adapt for PR feedback

* chore: remove .only

* chore: clean up docs and clean up the proxy map when objects are released

* chore: ensure we cache object values that are cloned through the V8 serializer
2019-10-18 12:57:09 -07:00
Electron Bot e74b21bff5 Bump v8.0.0-nightly.20191018 2019-10-18 08:31:50 -07:00
Cheng Zhao 19223952a8
chore: remove native_mate (Part 8) (#20598)
* refactor: convert methods of AutoUpdater to gin

* refactor: converter in map_converter.h is no more needed

* refactor: use gin in crash_reporter

* refactor: remove native_mate_converters/map_converter.h

* refactor: implement gfx_converter with gin

* refactor: convert methods of NativeImage to gin

* refactor: add gin_helper::Arguments

* fix: use gin_helper::Arguments to parse multi-type parameters
2019-10-18 09:31:29 +09:00
Electron Bot 86258c6cff Bump v8.0.0-nightly.20191017 2019-10-17 08:33:48 -07:00
Electron Bot e06b0aa73b Bump v8.0.0-nightly.20191016 2019-10-16 08:31:19 -07:00
Electron Bot dceabf231b Bump v8.0.0-nightly.20191015 2019-10-15 08:31:28 -07:00
Cheng Zhao 1ecfcc8c70
chore: remove native_mate (Part 7) (#20561)
* refactor: use gin converters in api::Protocol

* refactor: convert JS constructor impl to gin

* refactor: use InitWithArgs helper

* fix: gin_helper::Dictionary should behave the same with mate

* fix cpplint warnings

* refactor: no more need to patch gin/dictionary.h
2019-10-15 10:15:23 +09:00
Electron Bot 6c6bff81ac chore: bump node to v12.10.0 (master) (#20129)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2019-10-14 15:46:10 -07:00
Electron Bot dfac05805d Bump v8.0.0-nightly.20191014 2019-10-14 08:30:58 -07:00
Robo 5c2c30142c
fix: append network switches to network service process (#20546) 2019-10-13 18:21:41 -07:00
Electron Bot 5bd7b6ad50 Bump v8.0.0-nightly.20191013 2019-10-13 08:31:09 -07:00
Electron Bot 2cf64d0200 Bump v8.0.0-nightly.20191012 2019-10-12 08:32:39 -07:00
Cheng Zhao 1b2c6a33b3 fix: do not manually parse content-type (#20538) 2019-10-11 14:54:50 -04:00
Electron Bot d21519ed2e Bump v8.0.0-nightly.20191011 2019-10-11 08:31:51 -07:00
Shelley Vohr 812de5d3bf fix: properly register custom url evt handling (#20518) 2019-10-10 08:54:03 -07:00
Electron Bot ec2c1db0e4 Bump v8.0.0-nightly.20191010 2019-10-10 08:31:27 -07:00
Milan Burda bb2ab01f99 fix: when building with enable_plugins=false (#20354)
* fix: when building with enable_plugins=false

* build: exclude printing service to avoid patch

* build: update plugins patch from upstream
2019-10-09 19:59:37 +02:00
Jeremy Apthorp 2fad53e66b refactor: use v8 serialization for ipc (#20214)
* refactor: use v8 serialization for ipc

* cloning process.env doesn't work

* serialize host objects by enumerating key/values

* new serialization can handle NaN, Infinity, and undefined correctly

* can't allocate v8 objects during GC

* backport microtasks fix

* fix compile

* fix node_stream_loader reentrancy

* update subframe spec to expect undefined instead of null

* write undefined instead of crashing when serializing host objects

* fix webview spec

* fix download spec

* buffers are transformed into uint8arrays

* can't serialize promises

* fix chrome.i18n.getMessage

* fix devtools tests

* fix zoom test

* fix debug build

* fix lint

* update ipcRenderer tests

* fix printToPDF test

* update patch

* remove accidentally re-added remote-side spec

* wip

* don't attempt to serialize host objects

* jump through different hoops to set options.webContents sometimes

* whoops

* fix lint

* clean up error-handling logic

* fix memory leak

* fix lint

* convert host objects using old base::Value serialization

* fix lint more

* fall back to base::Value-based serialization

* remove commented-out code

* add docs to breaking-changes.md

* Update breaking-changes.md

* update ipcRenderer and WebContents docs

* lint

* use named values for format tag

* save a memcpy for ~30% speedup

* get rid of calls to ShallowClone

* extra debugging for paranoia

* d'oh, use the correct named tags

* apparently msstl doesn't like this DCHECK

* funny story about that DCHECK

* disable remote-related functions when enable_remote_module = false

* nits

* use EnableIf to disable remote methods in mojom

* fix include

* review comments
2019-10-09 13:59:08 -04:00
Electron Bot c250cd6e7c Bump v8.0.0-nightly.20191009 2019-10-09 08:33:39 -07:00
Shelley Vohr f80a17c5be feat: allow Linux/Windows users to set notification timeout (#20153)
* feat: allow Linux users to set notification timeout

* implement on windows
2019-10-09 11:22:21 -04:00
Cheng Zhao 5e11be6898
fix: cookies.get should be able to filter domain (#20471)
* fix: use GetAllCookies when url is empty

* test: get cookie without url
2019-10-09 15:57:40 +09:00
Jeremy Apthorp ebd55c1147
fix: fix crash in crashReporter.getUploadedReports (#20428) 2019-10-08 16:35:28 -07:00
Electron Bot 94ec4ecabe Bump v8.0.0-nightly.20191008 2019-10-08 08:32:37 -07:00