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

8 Коммитов

Автор SHA1 Сообщение Дата
Samuel Attard 0d2e967960
feat: expose electron/{process} typed modules (#22937)
* feat: expose electron/{process} typed modules

* chore: update imports for common modules

* chore: update typescript generator

* chore: remap electron/* to the internal packages
2020-04-06 17:04:09 -07:00
Samuel Attard 5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Jeremy Apthorp ecd9e1f26e
chore: lint spec-main (#20835) 2019-11-01 13:37:02 -07:00
Jeremy Apthorp e5d1e7b4da fix: move window.open postMessage test to main runner to fix flake (#18735) 2019-06-12 08:35:58 +09:00
Jeremy Apthorp 901cdb22e3
test: move some BrowserWindow specs to the main runner (#18551) 2019-06-03 15:10:58 -07:00
Jeremy Apthorp babe2b68fb
test: move beforeunload tests to main runner and fix flake (#18432) 2019-05-29 13:38:14 -07: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 ca701bb9af
spec: initial spike of main-process based tests 2019-03-14 12:50:06 -07:00