Commit graph

49 commits

Author SHA1 Message Date
Electron Bot
72a089262e
chore: bump chromium to a84d34e372b8fb5e9a94b1b4b447e (master) (#23908)
* chore: bump chromium in DEPS to a7249f73ae05d456c04487ef1693325f719556dd

* chore: bump chromium in DEPS to 202466fa40b58f0bb9c9a76a037d1c50154c099e

* chore: bump chromium in DEPS to 2dd1b25c8d794b50fb0dd911e0c4e909ff39f145

* Update patches

* update patches

* Revert "[printing] Mojofy PrintHostMsg_CheckForCancel"

https://chromium-review.googlesource.com/c/chromium/src/+/2226002

* chore: bump chromium in DEPS to 8c1542e7dd36854fdf4abd1a8021eeb65a6a2e2b

* chore: bump chromium in DEPS to 078bc6d796334fb403acd8975b99d1c8ecd028e8

* chore: bump chromium in DEPS to d96e9f16ae852ec9dbd15bf17df3d440402413bb

* update patches

* chore: update patches

* Use ExtensionSystem::is_ready() instead of ExtensionService::is_ready()

https://chromium-review.googlesource.com/c/chromium/src/+/2207499

* Remove WebImeTextSpan

https://chromium-review.googlesource.com/c/chromium/src/+/2225240

* Remove PDFAnnotations flag altogether.

https://chromium-review.googlesource.com/c/chromium/src/+/2229317

* Rework find-from-selection so it's synchronous -- fixes flaky tests

https://chromium-review.googlesource.com/c/chromium/src/+/2181570

* fixup! Revert "[printing] Mojofy PrintHostMsg_CheckForCancel"

* chore: bump chromium in DEPS to a8a280835830c65145ed8573a9a09f36d3920418

* update sysroots

* update patches

* update patches

* Take RFH as a parameter for DidUpdateFavicon/ManifestURL

https://chromium-review.googlesource.com/c/chromium/src/+/2224745

* chore: bump chromium in DEPS to b6149cb5a5e32caf8eab67b97ef3072b72521ca8

* Update patches

* Rename net::cookie_util::StripStatuses to StripAccessResults

https://chromium-review.googlesource.com/c/chromium/src/+/2212697

* use net::CookieAccessResultList instead of net::CookieAccessResultList

* fix mas_no_private_api patch

https://chromium-review.googlesource.com/c/chromium/src/+/2230281

* chore: bump chromium in DEPS to a27feee1643d952e48f77c92d8c03aedea14b720

* update patches

* fix: add new navigation state REUSE_SITE_INSTANCE

To fix the new set of state checks added in
https://chromium-review.googlesource.com/c/chromium/src/+/2215141

* chore: bump chromium in DEPS to ff4559a4c13d20888202474e4ab9917dbdad8a9a

* update patches

* Cleanup usages of old mojo types and remove unused code

https://chromium-review.googlesource.com/c/chromium/src/+/2235699

* chore: bump chromium in DEPS to 05279845f76eb22900a8b0d1a11d4fd339a8e53b

* chore: bump chromium in DEPS to 821558279767cffec90e3b5b947865f90089fed3

* chore: bump chromium in DEPS to 1aef04e6486be337d3dd820b2d64d6320a1b9c13

* chore: bump chromium in DEPS to dc86386e8fdd796a0f7577e91e42a7f8b7e9bc78

* chore: bump chromium in DEPS to 64f2360794f14643764092ba3e58e2ed8f9fee12

* chore: update patches

* refactor: MessageLoop, you are terminated \o/

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2246173

* refactor: plumb DownloadSchedule to DownloadItem

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2242202

* chore: fix variable typo in IPC

* chore: s/BindPipeAndPassReceiver/BindNewPipeAndPassReceiver

* chore: update patches

* chore: XEvent becomes x11::Event

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2240355

* fixup! refactor: MessageLoop, you are terminated \o/

* fixup! chore: XEvent becomes x11::Event

* build: update v8 headers

* chore: fix windows build

* chore: disable SameSite-by-default changes

https://chromium-review.googlesource.com/c/chromium/src/+/2231445

* update printing.patch

* chore: bump chromium DEPS to 9ae03ef8f7d4f6ac663f725bcfe70311987652f3

* Convert WidgetHostMsg_SelectionBoundsChanged/TextInputStateChanged

https://chromium-review.googlesource.com/c/chromium/src/+/2243531

* chore: update v8 patches

* [XProto] Replace usages of XID and ::Window with x11::Window

https://chromium-review.googlesource.com/c/chromium/src/+/2249389

* Update VideoFrameMetadata to use base::Optionals

https://chromium-review.googlesource.com/c/chromium/src/+/2231706
https://chromium-review.googlesource.com/c/chromium/src/+/2238361

* --disable-dev-shm-usage for gpu process crash

* [v8] Allow for 4GB TypedArrays

https://chromium-review.googlesource.com/c/v8/v8/+/2249668

* update lib_src_switch_buffer_kmaxlength_to_size_t.patch

* disable app.getGPUInfo spec on linux

* update patches

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: Electron Bot <anonymous@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2020-06-22 10:35:10 -07:00
Samuel Attard
09c0ee8f87
build: remove dead symlink from MAS build (#24158)
* build: remove dead symlink from MAS build

* chore: new out cache

* build: fixup gn check

* Update node_main.cc

* chore: fix lint
2020-06-16 14:19:57 -07:00
Jeremy Apthorp
a1c55a13e1
fix: throw instead of crash when using ipcRenderer after context released (#23917) 2020-06-04 16:25:25 -07:00
Samuel Attard
9d7ba98209
refactor: remove the RenderFrameFunctionStore and use privates to memory manage (#23592) 2020-05-15 11:57:40 -07:00
Milan Burda
ef176ce368
build: fix building with enable_remote_module = false (#23499) 2020-05-12 18:32:04 +02:00
Samuel Attard
7bba36a095
chore: add TRACE calls for heavy ctx bridge methods (#23501) 2020-05-11 14:24:43 -07:00
Samuel Attard
7f9b7b2e95
chore: clean up context bridge scopes and add specs for internal bridge (#23334)
* chore: clean up context bridge context scopes

* spec: add specs for internalContextBridge
2020-05-11 13:41:42 -07:00
Jeremy Apthorp
06bf0d08dc
fix: crashReporter incompatible with sandbox on Linux (#23265) 2020-05-07 13:31:26 -07:00
Samuel Attard
075472d6ef
fix: do not leak IPC or context bridge promises (#23321) 2020-04-29 15:51:41 -07:00
Samuel Attard
abe5cf398c
refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)
* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
2020-04-27 12:46:04 -07:00
Samuel Attard
96bf9ce77f
refactor: port parts of window-setup to use ctx bridge instead of being run in the main world (#23194)
* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world

* chore: update ctx bridge specs for new base numbers
2020-04-22 12:42:51 -07:00
Samuel Attard
0cbcee6740
fix: ensure that functions are not retained beyond their context being released (#23207) 2020-04-21 18:05:01 -07:00
Jeremy Apthorp
f6e8edfb3d
chore: rename renderer_ipc.cc to ipc_renderer.cc (#23125) 2020-04-20 08:18:15 -07:00
Samuel Attard
e4c82fdf2d
Merge pull request from GHSA-h9jc-284h-533g 2020-04-16 14:10:18 -07:00
Shelley Vohr
5c2299cbe6
fix: webframe crashes for removed render frame (#22925)
* fix: webframe crashes for removed render frame

* Make errors more descriptive
2020-04-02 19:59:19 -07:00
Shelley Vohr
a4c4c86b9d
fix: crash on invalid zoomFactor (#22673) 2020-03-13 16:13:05 -07:00
Jeremy Apthorp
b4d07f76d3
feat: MessagePorts in the main process (#22404) 2020-03-11 18:07:54 -07:00
Samuel Attard
2563681583
fix: disable contextBridge object identity caching (#21803)
* fix: disable contextBridge object identity caching

* cleanup

* chore: make non-const references raw pointers

* fix: zero-param constructors are not explicit

* refactor: use base::LinkedList

Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-03-03 23:18:22 -08:00
Electron Bot
39baf68790
chore: bump chromium to 5b340c815ce15ab2efcf277ed19e9 (master) (#22064)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: loc <andy@slack-corp.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-03-03 13:35:05 -08:00
bughit
84126a4f23
feat: optional typically sync callback for WebFrame#executeJavaScript* (#21423) 2020-03-02 16:11:40 -08:00
Samuel Maddock
8cc0435d9c
fix(extensions): set lowest isolated world id (#22212)
* fix(extensions): set lowest isolated world id

* refactor: move world IDs into separate header file

Several files are including electron_render_frame_observer.h just for the world IDs.
2020-02-24 13:33:58 +09:00
Jeremy Apthorp
602913cb4c
chore: rename node bindings atom => electron (#22176) 2020-02-14 06:25:39 -05:00
Samuel Attard
dafbf04b9a fix: use a WeakPtr so we do not UAF the store in FunctionLifetimeMonitor (#22056) 2020-02-08 20:49:38 -08:00
Jeremy Apthorp
d9321f4df7
chore: rename atom -> electron (#21986) 2020-02-04 12:19:40 -08:00
loc
301bd8aec0 fix: avoid contextBridge double free on garbage collection (#21592)
* fix: reset next/prev pointers for life-monitored nodes

* fix: don't double-delete nodes in a linked list
2020-01-10 15:59:50 -08:00
Jeremy Apthorp
54b4756a29
refactor: try just using regular [Sync] for MessageSync (#20797) 2019-12-17 11:35:28 -08:00
loc
19cd8f3a02 fix: avoid contextBridge crash when RenderFrame address is reused (#21501)
* fix: avoid contextBridge crash when RenderFrame address is reused

Co-Authored-By: Jeremy Apthorp <nornagon@nornagon.net>

* make routing_id_ const
2019-12-13 13:13:04 -05:00
loc
8a06ef11cf fix: ensure persistence store still exists when GC runs (#21402)
Fix a bad access crash that happens when a render frame is deleted (window closed) and garbage collection runs afterward.
2019-12-06 11:15:08 -08:00
Jeremy Apthorp
9526c5584e
fix: deprecate setLayoutZoomLevelLimits (#21296) 2019-12-02 13:27:03 -08:00
loc
f26b7931eb fix: add missing early return (#21264) 2019-11-25 11:03:54 -08:00
Cheng Zhao
eaf2c61bef
refactor: migrates util::Promise to gin (#20871)
* refactor: use gin in Promise

* refactor: separate Promise impl that returns nothing

* refactor: use Promise<void> for promise that returns nothing

* fix: methods should be able to run on both browser and renderer process

* fix: should not pass base::StringPiece across threads

* refactor: no more need to use different ResolvePromise for empty Promise

* refactor: move Promise to gin_helper
2019-11-01 15:10:32 +09:00
Cheng Zhao
3ae3233e65
chore: remove native_mate (Part 12) (#20869)
* refactor: move mate::Event to gin

* refactor: move mate::Locker to gin

* refactor: convert contextBridge to gin

* refactor: convert contentTracing to gin

* refactor: remove callback converter of native_mate

* refactor: remove file_dialog_converter and native_window_converter from native_mate

* refactor: convert webFrame to gin

* refactor: move blink_converter to gin

* refactor: remove net_converter from native_mate

* refactor: remove event_emitter_caller_deprecated

* refactor: remove gurl_converter from native_mate

* refactor: remove file_path and string16_converter from native_mate

* refactor: remove image_converter from native_mate

* refactor: move value_converter to gin
2019-10-31 16:56:00 +09: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
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
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
Cheng Zhao
624ba4f642 chore: remove native_mate (Part 5) (#20264)
* deprecate native_mate/native_mate/object_template_builder.h

* add gin_helper/object_template_builder.h

* add patch to avoid ambiguous error

* remove usage of object_template_builder_deprecated.h in a few files

* add note we should remove gin_helper/object_template_builder.h in future
2019-09-19 08:09:15 -07:00
Electron Bot
eb2d2264d0 chore: bump chromium to 63be48daea281d4f8c834c2e707a7 (master) (#19923) 2019-09-18 15:58:00 -04:00
Charles Kerr
2b316f3843
refactor: run clang-tidy (#20231)
* refactor: clang-tidy modernize-use-nullptr

* refactor: clang-tidy modernize-use-equals-default

* refactor: clang-tidy modernize-make-unique

* refactor: omit nullptr arg from unique_ptr.reset()

As per comment by @miniak
2019-09-16 18:12:00 -04:00
Charles Kerr
b2652beceb
refactor: apply some 'clang-tidy -fix' changes (#20172)
* refactor: fix clang-tidy vector operation warnings

Fix vector population performance-inefficient-vector-operation warnings
generated by clang-tidy

* refactor: fix clang-tidy emplace_back warnings

In cases where a temporary is created to be passed
to push_back(), replace it with emplace_back().

Warning: modernize-use-emplace

* refactor: fix clang-tidy loop iteration warnings

When practical, use range-based for loops instead of C-style for loops.

clang-tiny check: modernize-loop-convert

* refactor: fix clang-tidy string initialize warning

Remove redundant empty string initialization.

clang-tidy check: readability-redundant-string-init
2019-09-13 10:26:59 -04:00
Cheng Zhao
2c23e44ed9
chore: remove native_mate (Part 3) (#20131)
* use gin converter in atom_api_menu

* please only put necessary includes in header

Having include in header means they have dependency relationship,
putting arbitrary includes really really really really really makes
refacoring much harder.

* remove some simple uses of callback_converter_deprecated.h

* use gin callback converter in file_dialog code

* use gin in ErrorThrower

* use gin in atom_bundle_mover

* fix mistake in node stream

* deprecate native_mate version of event_emitter_caller

* use gin in node_bindings

* remove usages of native_mate event_emitter_caller.h except for EventEmitter

* fix compilation on Windows

* gin::Arguments behaves differently on GetNext

* just use StringToV8
2019-09-06 14:52:54 +09:00
Cheng Zhao
81ae154714 chore: remove native_mate (Part 2) (#20106)
* add notice to files being removed

* add gin version of function_template.h

* rename callback.h to avoid confliction

* add gin version of callback_converter

* add gin converter for OnceCallback

* remove callback_converter_gin_adapter.h

* remove gin_util.h and gin_utils.h

* fix lint warning

* add helper for setting methods
2019-09-04 08:45:25 -07:00
Milan Burda
81e9dab52f refactor: replace ipcRendererUtils.invoke() with ipcRendererInternal.invoke() (#19574) 2019-08-23 15:45:50 -07:00
Samuel Attard
6a3922d330
refactor: make util::Promise type safe when chaining in native (#19809)
* refactor: make util::Promise type safe when chaining in native

* fixup! refactor: make util::Promise type safe when chaining in native

* chore: remove spare brackets
2019-08-22 17:03:28 -07:00
Shelley Vohr
3ee95cf0e8
feat: support css origin in frame.insertCSS (#19268)
* feat: support css origin in frame.insertCSS

* move cssOrigin to an options object
2019-07-17 14:34:05 -07:00
Samuel Attard
34c4c8d508 refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
Samuel Attard
56930338e8 chore: fix linting after shell rename 2019-06-19 17:33:28 -07:00
Samuel Attard
2160c1fcc9 refactor: replace includes for atom with shell 2019-06-19 17:33:28 -07:00
Samuel Attard
d7f07e8a80 refactor: rename the atom directory to shell 2019-06-19 17:33:28 -07:00