Commit graph

2593 commits

Author SHA1 Message Date
Jacob
a7c2f79a94 fix: prevent silent failure when DOM storage quota exceeded (#20899)
* test: update DOM storage quota limits test

* fix: update dom_storage_limits.patch (fixes #13465)

The previous version of this patch did not include
changes required to circumvent the quota enforcement
performed by StorageAreaImpl. Consequently when
the quota was exceeded, things still "appeared to
work" at first but then would later fail silently.
That is, the cache would be updated but the backing
store would not.

This could be fixed by disabling the code below
(from `content/browser/dom_storage/storage_area_impl.cc`)
```
  // Only check quota if the size is increasing, this allows
  // shrinking changes to pre-existing maps that are over budget.
  if (new_item_size > old_item_size && new_storage_used > max_size_) {
    if (map_state_ == MapState::LOADED_KEYS_ONLY) {
      receivers_.ReportBadMessage(
          "The quota in browser cannot exceed when there is only one "
          "renderer.");
    } else {
      std::move(callback).Run(false);
    }
    return;
  }
```

However, since this seems to have some unintended side-effects
(see updated notes in dom_storage_limits.patch) it seems
more prudent to simply increase the quota to a larger
yet still reasonable size rather than attempt to circumvent
the storage quota altogether.
2019-11-22 11:35:54 -08:00
Milan Burda
145dd33da1 spec: skip flaky <webview>.capturePage() test on Windows (#21175) 2019-11-19 12:57:35 -05:00
Jeremy Apthorp
26ecf63ab4
test: remove a bunch of usage of the remote module (#21119) 2019-11-14 14:09:03 -08:00
Milan Burda
1d596f616d fix: NativeImage serialization of <webview>.capturePage() result (#20825) 2019-11-12 21:56:17 +01:00
Milan Burda
093f2dd4a6 chore: remove deprecated <webview>.getWebContents() (#20986) 2019-11-08 15:46:35 -05:00
Shelley Vohr
d3622f9c37
feat: convert shell.openItem to async shell.openPath (#20682) 2019-11-07 23:08:43 -08:00
Milan Burda
f1e7393e30 feat: deprecate <webview>.getWebContents() (#20726) 2019-11-07 09:43:19 -08:00
Samuel Attard
24939e8fa4
build: speedy tests on circle by splitting the test files into multiple jobs (#21015)
* build: let circleci divide our test suites in two

* well our tests rely on side affects, thats cool I guess
2019-11-06 16:15:55 -08:00
Shelley Vohr
05de7277ab docs: fix win.setIcon ts type (#20950)
* docs: fix win.setIcon ts type

* test: update smoke tests
2019-11-05 13:47:08 -08:00
loc
15dffb3dde fix: allow iframe-initiated HTML fullscreen to exit while in macOS fullscreen (#20962)
* fix: explicitly resize the contents when exiting html fullscreen while in OS fullscreen

* test: ensure HTML fullscreen toggles while in OS fullscreen
2019-11-05 13:34:45 -08:00
Milan Burda
01e18c2fc3 fix: cannot access nativeTheme via electron.remote (#20938) 2019-11-04 14:17:03 -08:00
Samuel Attard
267821831c
fix: capture the promise global to avoid userland mutation (#20925) 2019-11-04 11:16:51 -08:00
Jeremy Apthorp
6781d5e3c8
test: there is only --ci (#20794) 2019-10-30 16:38:21 -07:00
Milan Burda
3d56e13b38 fix: devtools extensions not loading (#20791) 2019-10-30 14:46:52 +09:00
Jeremy Apthorp
baaf058380 test: remove last usages of spec/window-helpers (#20792)
* test: remove last usages of spec/window-helpers

* move fixture
2019-10-29 13:16:42 +09:00
Electron Bot
b6246dcf12 chore: bump chromium to f5b345dd470f14eef6e44732ccf23 (master) (#20649) 2019-10-28 15:12:35 -07:00
Jeremy Apthorp
b155ebeeb3 fix: don't overwrite global constructor names in remote (#20637)
* fix: don't overwrite global constructor names in remote

* fake constructor names better, and improve error serialization
2019-10-21 15:48:03 +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
221ce70699 test: remove remote usage from chromium spec (#20568)
* test: move & expand webview -> window.open() opener tests

* remove remaining usage of 'protocol' from chromium-spec.js

* remove final usages of remote from chromium-spec

* remove import of window-helpers
2019-10-16 11:12:31 -04:00
Jeremy Apthorp
9055b5cf6d
test: simplify node setInterval test (#20594) 2019-10-15 17:10:28 -07:00
Jeremy Apthorp
8dad0c7aaa
test: move crashReporter specs to the main process (#20417) 2019-10-14 14:38:54 -07:00
Alexey Kuzmin
b085dac15b spec: allow "Yu Gothic" as a Japanese sans-serif font on Windows (#20564) 2019-10-14 14:30:18 -04:00
Jeremy Apthorp
d67f25ce43
test: expand window.opener test and move to main process (#20549) 2019-10-14 09:00:34 -07:00
Jeremy Apthorp
1f44f47de1 test: move debugger spec to main process (#20514) 2019-10-14 14:32:11 +09:00
Jeremy Apthorp
2aa7ab821c
test: remove some remote usage from chromium specs (#20121)
* test: remove remote usage from chromium specs

* disable tts test

* port navigator.mediaDevices tests

* fake camera and microphone

* Update spec-main/chromium-spec.ts

Co-Authored-By: John Kleinschmidt <jkleinsc@github.com>
2019-10-11 13:55:50 -07:00
Jeremy Apthorp
67642312f4
test: remove remote usage from webFrame test (#20512) 2019-10-11 10:20:08 -07:00
Jeremy Apthorp
032353b14f
test: remove remote usage from asar spec (#20513) 2019-10-11 09:56:51 -07:00
Jeremy Apthorp
50178d4836
test: remove more unused files (#20529) 2019-10-10 15:20:04 -07:00
Jeremy Apthorp
01448e1235
chore: delete some unreferenced test files (#20511) 2019-10-10 11:24:06 -07:00
Milan Burda
b92163d226 refactor: take advantage of structured clone algorithm in the remote module (#20427) 2019-10-10 09:59:08 -04:00
Jeremy Apthorp
8de925c4c2
test: move module tests to main process (#20419) 2019-10-09 16:33:15 -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
Jeremy Apthorp
87bd0501c4
test: remove 'remote' usage from process tests (#20418) 2019-10-04 13:58:44 -07:00
Milan Burda
ccff140046 feat: add --enable-api-filtering-logging commandline switch (#20335) 2019-10-04 10:49:09 -07:00
Jeremy Apthorp
2470ef2e91
ci: enable crashReporter tests on mac (#19582) 2019-10-02 17:53:51 -07:00
Milan Burda
2f03d393c3 feat: allow inspection of specific shared workers (#20389) 2019-10-02 14:38:27 +02:00
Milan Burda
bf978e09e4 fix: allow paths to asar archives to contain the .asar extension in directories (#20342) 2019-10-02 13:33:07 +09:00
Cheng Zhao
ef690c035d fix: correctly crash when there is no crashReporter (#20388)
* fix: correctly crash when there is no crashReporter

* test: correctly crash when there is crashReporter
2019-10-01 13:20:21 -04:00
Jeremy Apthorp
a9e695d05f
test: move more web contents specs (#20099) 2019-09-30 15:00:47 -07:00
Jeremy Apthorp
9abdfc11a9 test: remove usage of remote module from node tests (#20103)
* test: remove usage of remote module from node tests

* isTTY is undefined in the renderer process on all platforms

* Update spec/node-spec.js

* Update node-spec.js
2019-09-20 10:41:40 -04:00
Jeremy Apthorp
e83c299454
test: move ipcRenderer spec to main runner (#20093) 2019-09-19 16:35:05 -04:00
Milan Burda
11cd0db86b build: add enable_remote_module build flag (#19821) 2019-09-18 09:52:06 -07:00
John Kleinschmidt
7be1905023 fix: resolve crash loading file based serviceworkers (#20132) 2019-09-06 10:01:22 +09:00
Jeremy Apthorp
88e32ef231
test: move robotjs-based devtools paste test to main runner (#20095) 2019-09-04 14:44:13 -07:00
Jeremy Apthorp
a453f2ae6c
test: fix test for desktopCapturer preventDefault (#20100) 2019-09-04 13:54:40 -07:00
Jeremy Apthorp
c29e4b096d
test: tsify deprecate spec (#20089) 2019-09-04 11:13:37 -07:00
Jeremy Apthorp
8cdfd30ba5
test: remove usage of remote in shell.openExternal test (#20101) 2019-09-04 11:12:31 -07:00
John Kleinschmidt
bedc5f7da9
ci: run tests on WOA hardware (#20031)
* ci: run tests on WOA hardware

* Temporarily disable test until #20008 is resolved

* deterministically run tests in sorted order
2019-09-03 13:13:06 -04:00
Jeremy Apthorp
96c3fec855
test: remove usage of 'remote' module from webview spec (#20048) 2019-09-03 10:10:58 -07:00