Commit graph

7211 commits

Author SHA1 Message Date
Cheng Zhao
344197083e fix: drain tasks before shutting down isolate (#17879) 2019-04-19 11:01:45 -07:00
Shelley Vohr
0749dc4cc1
refactor: make app logs dir creation opt-in (#17841)
Previously, we were creating the app logs folder at a predefined location during initial electron startup, which meant that it had to be manually removed and prevented clean app portability. This refactors that implementation such that it's now an opt-in feature and developers must call app.setAppLogsPath(path) with an optional custom path in order to set this directory.
2019-04-18 22:04:58 -07:00
Milan Burda
5e7c828c9e fix: copy pixels in AddImageSkiaRepFromBuffer (#17843) 2019-04-18 09:16:34 +09:00
Milan Burda
3c2ff97a16 fix: copy pixels in NativeImage::CreateFromBitmap (#17844) 2019-04-18 09:16:06 +09:00
Samuel Attard
829050daab
build: rename sandbox bundle (#17831) 2019-04-17 17:18:03 -04:00
Heilig Benedek
81bf15877f fix: port OSR code to new viz compositor codepath (#17538)
* fix: make OSR work with viz compositor

* fix: update OSR patch

* fix: update patch again

* fix: update viz_osr.patch for macOS

* fix: gn check warnings

* chore: no need to change SoftwareOutputDeviceWinProxy

* chore: add check in case we missed something

* fix: consider scale factor when compare size

* fix: make GPU OSR work

* fix: autofill popups with OSR

* chore: use UNIX line ending for osr_video_consumer

* chore: code is already in defined(OS_MACOSX)

* fix: share same OSR implementation on macOS

This should also fix the crash when there is navigation on macOS.

* test: osr window should not crash after navigation

* fix: make osr work on Mac properly

* fix: software osr on windows

* fix: software osr on Linux

* fix: compilation error introduced with rebase

* fix: split local surface id allocation into two

* Update osr_host_display_client_mac.mm

* chore: update copyright year

* fix: update patch
2019-04-17 14:10:04 -07:00
Shelley Vohr
1478bd36fd refactor: remove superfluous ScopedAllowBaseSync in desktopCapturer (#17842) 2019-04-17 14:32:24 -04:00
Samuel Attard
78411db4b5
fix: maintain a ref count for objects sent over remote (#17464)
* spec: clean up after a failed window count assertion

Previously when this assertion failed all tests that ran after the
failed assertion also failed.  This ensure that the assertion fails for
the test that actually caused the issue but cleans up the left-over
windows so that future tests do not fail.

* fix: maintain a ref count for objects sent over remote

Previously there was a race condition where a GC could occur in the
renderer process between the main process sending a meta.id and the
renderer pulling the proxy out its weakmap to stop it being GC'ed.

This fixes that race condition by maintaining a "sent" ref count in the
object registry and a "received" ref count in the object cache on the
renderer side.  The deref request now sends the number of refs the
renderer thinks it owns, if the number does not match the value in the
object registry it is assumed that there is an IPC message containing a
new reference in flight and this race condition was hit.

The browser side ref count is then reduced and we wait for the new deref
message.  This guaruntees that an object will only be removed from the
registry if every reference we sent has been guarunteed to be unreffed.
2019-04-16 16:08:11 -04:00
Samuel Attard
9c3315c416
fix: reset the NSUserNotication handle on dismiss (#17796) 2019-04-16 14:38:41 -04:00
Samuel Attard
b7b9efa875
fix: handle remote-debugging-port=0 correctly (#17800)
By default the Chromedriver will send remote-debugging-port=0 to let the
browser choose a free port to listen on.  The chosen port is written to
a known file in the user data dir that is passed to the app through the
CLI.

This PR does two things.

1. Correctly passes the USER_DATA_DIR to the remote debugging server so
it knows where to write the file
2. Adds support for --user-data-dir as we did not support that CLI
argument and Chromedriver relies on being able to tell the "browser"
where to write this file.

Fixes #17354
2019-04-16 14:22:51 -04:00
Pedro Pontes
a7e22c78cf fix: populate phase of WebMouseWheelEvents generated in webContents.sendInputEvent. (#17757) 2019-04-16 12:23:38 -04:00
Shelley Vohr
82a076855b fix: incorrect default path setting for dl items (#17773) 2019-04-15 14:11:20 -04:00
Vlad Hashimoto
258d337cf8 fix: crash when alt key pressed with falsy menu bar visiblity (#17766) 2019-04-15 13:54:27 -04:00
Cheng Zhao
748632d655
chore: make it possible to turn on NetworkService with cmd flag (#17729) 2019-04-11 08:51:17 +09:00
Cheng Zhao
e7c48922e7
fix: FrameSubscriber should not scale frame down (#17444) 2019-04-08 11:35:33 +09:00
Shelley Vohr
2b9bd0f56f
fix crash when passing empty string to recording (#17698) 2019-04-05 11:19:06 -07:00
Shelley Vohr
9c3cb55ef2
refactor: make accessibilitySupportEnabled a property on app (#17362)
* refactor: make accessibilitySupport a prop on app

* fix docs

* update spec
2019-04-04 19:49:04 -07:00
Electron Bot
11699d8611 Bump v6.0.0-nightly.20190404 2019-04-04 11:42:14 -07:00
Cheng Zhao
ac30185a04 fix: the callback of beginFrameSubscription should pass NativeImage instead of Buffer (#17548)
* Revert "revert: frame subscriber deprecation and re-enable tests"

This reverts commit f643ce4f66.

* fix: make sure SkBitmap's pixels are copied
2019-04-04 11:36:12 -07:00
Milan Burda
77d59e99b6 feat: emit process 'loaded' event in sandboxed renderers (#17680) 2019-04-04 11:35:06 -07:00
Jeremy Apthorp
127b87c713
refactor: mojofy MessageTo and MessageHost (#17613) 2019-04-03 14:22:23 -07:00
Samuel Attard
5d45b59f7f
Merge pull request #17507 from electron/chromium-upgrade/75
chore: update to chromium 75.0.3740.3
2019-04-03 13:17:37 -07:00
Jeremy Apthorp
53f6cbccbf
refactor: use mojo for electron internal IPC (#17406)
* refactor: use mojo for electron internal IPC

* add sender_id, drop MessageSync

* remove usages of AtomFrameMsg_Message

* iwyu

* first draft of renderer->browser direction

* refactor to reuse a single ipc interface

* implement TakeHeapSnapshot through mojo

* the rest of the owl^WtakeHeapSnapshot mojofication

* remove no-op overrides in AtomRendererClient

* delete renderer-side ElectronApiServiceImpl when its pipe is destroyed

* looks like we don't need to overlay the renderer manifest after all

* don't try to send 2 replies to a sync rpc

* undo changes to manifests.cc

* unify sandboxed + unsandboxed ipc events

* lint

* register ElectronBrowser mojo service on devtools WebContents

* fix takeHeapSnapshopt failure paths

* {electron_api => atom}::mojom

* add send_to_all to ElectronRenderer::Message

* keep interface alive until callback is called

* review comments

* use GetContext from RendererClientBase

* robustify a test that uses window.open

* MessageSync posts a task to put sync messages in the same queue as async ones

* add v8::MicrotasksScope and node::CallbackScope

* iwyu

* use weakptr to api::WebContents instead of Unretained

* make MessageSync an asynchronous message & use non-associated interface

* iwyu + comments

* remove unused WeakPtrFactory

* inline OnRendererMessage[Sync]

* cleanups & comments

* use helper methods instead of inline lambdas

* remove unneeded async in test

* add mojo to manifests deps

* add gn check for //electron/manifests and mojo

* don't register renderer side service until preload has been run

* update gn check targets list

* move interface registration back to RenderFrameCreated
2019-04-02 15:38:16 -07:00
Samuel Attard
2fda0bdc89 chore: enable_data_url_support does not exist anymore 2019-04-02 14:43:06 -07:00
Jeremy Apthorp
7e9a271852 don't copy in make_shared in win32_desktop_notifications 2019-04-02 14:43:05 -07:00
Samuel Attard
e352d735f6 fix: use default constructor for NotificationData struct 2019-04-02 14:43:05 -07:00
Samuel Attard
43dc4e8a13 chore: include what we use, cmath in toast.cc 2019-04-02 14:43:05 -07:00
Samuel Attard
0fd0b3fb4b chore: make DCHECK available in win7 toast impl 2019-04-02 14:43:05 -07:00
deepak1556
515c927b14 fixup! enable_file_url_support and enable_data_url_support have been removed 2019-04-02 14:43:05 -07:00
Samuel Attard
b965abfda8 chore: replace DCHECK(a > b) with DCHECK_GT 2019-04-02 14:43:05 -07:00
Samuel Attard
90a738a4d4 fix: _ASSERT is not defined anymore, the appropriate replacement is DCHECK 2019-04-02 14:43:05 -07:00
Samuel Attard
04a8b9fe5c fix: base::LaunchOptions environ is now environment
Just a rename

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1509795
2019-04-02 14:43:05 -07:00
Samuel Attard
b429e6e2df chore: disable clang-format and cpplint for impl of HandleExternalProtocol
NOLINT disables the linting error that we can't fix because its just
implementing a content API.

We also disable clang-format because it tries to format the // NOLINT
onto a new line which doesn't exactly work
2019-04-02 14:43:04 -07:00
Samuel Attard
126639875d Revert "device/fido/mac: add more specific check for TouchID availability"
This reverts commit 457ff0687c.

The change in Chromium that required this removal was itself reverted.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1504308
2019-04-02 14:43:04 -07:00
Samuel Attard
158e41e578 chore: add missing content:: namespace for BrowserContext in PlatformNotificationService 2019-04-02 14:43:04 -07:00
Samuel Attard
7382c519c9 fix: Add stub implementations for ScheduleTrigger and
ReadNextTriggerTimestamp

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1479330
2019-04-02 14:43:04 -07:00
Samuel Attard
866cbb0147 fix: SetCanonicalCookieAsync now takes the full CookieOptions
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1471244
2019-04-02 14:43:04 -07:00
Samuel Attard
7467e91880 fix: RFH->ExecuteJavascriptForTesting now requires a callback
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1492042
2019-04-02 14:43:04 -07:00
Samuel Attard
74ac80e218 fix: ViewHierarchyChangedDetails moved to the views namespace
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1531481
2019-04-02 14:43:04 -07:00
Samuel Attard
ab92cfd174 fix: enable_file_url_support and enable_data_url_support have been
removed

Unsure how the change in default of file_url_support affects us

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1512337
2019-04-02 14:43:04 -07:00
Samuel Attard
f95de3d6f3 fix: RFH->ExecuteJavascript now requires a callback
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1492042
2019-04-02 14:43:04 -07:00
Samuel Attard
2bf740d2fe fix: remove enable_data_url_support from OnNetworkServiceCreated
data URLs are _always_ enabled in the network service now and this is
enforced in the Content layer.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1512337
2019-04-02 14:43:04 -07:00
Samuel Attard
406ceaabd1 chore: update permission_status.h include for new path 2019-04-02 14:43:03 -07:00
Jeremy Apthorp
e44b5263a1 add extra arguments to HandleExternalProtocol
https://chromium-review.googlesource.com/c/chromium/src/+/1491812
2019-04-02 14:43:03 -07:00
Samuel Attard
75442b794f
fix: make devtools extensions load correctly (#17614) 2019-03-30 17:36:13 -07:00
Samuel Attard
b8dbe4bc15
spec: add tests for the autoUpdater on macOS that actually test if it works (#17442)
* spec: add tests for the autoUpdater on macOS that actually test if it works

* spec: add express as dep

* spec: add logic to auto-trust self-signed certificate and not run autoupdate specs on MAS

* build: fix the step name for importing the codesign cert

* chore: update updater spec PR as per feedback

* fix: s/atomBinding/electronBinding

* build: use spawn instead of exec
2019-03-29 17:32:52 -07:00
Samuel Attard
3475cd168e
fix: handle a race condition between preload scripts executing and (#17577)
navigations

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
2019-03-28 11:13:05 -07:00
Richard Townsend
3d307e5610 fix: correct crash reporter for Windows on Arm (#17533)
ARM64 cleans up and moves around RUNTIME_FUNCTION structure fields.
With this patch applied, electron should build cleanly for Windows on Arm.
2019-03-27 11:30:11 -07:00
Samuel Attard
f4434763fe
fix: use file path as key for safeDialogs on filesystem (#17546) 2019-03-27 11:21:10 -07:00
Samuel Attard
2188a6ea99
fix: set default_id and cancel_id correctly on confirm dialogs (#17547) 2019-03-27 11:15:58 -07:00