Cheng Zhao
d16b581140
fix: remove memory leak when using webFrame and spell checker ( #16770 )
...
* fix: do not create native api::WebFrame in webFrame
When reloading a page without restarting renderer process (for example
sandbox mode), the blink::WebFrame is not destroyed, but api::WebFrame
is always recreated for the new page context. This leaves a leak of
api::WebFrame.
* fix: remove spell checker when page context is released
2019-02-08 13:38:31 -08:00
Milan Burda
1632c4b837
refactor: implement chrome.i18n.getMessage() without the remote module ( #16739 )
...
* refactor: implement chrome.i18n.getMessage() without the remote module
* replace navigator.language with app.getLocale()
2019-02-08 12:07:09 -08:00
Milan Burda
4211a9c69f
refactor: use ipcRendererUtils.invokeSync / ipcMainUtils.handleSync ( #16759 )
2019-02-06 09:53:28 -08:00
Milan Burda
6d674eebb1
refactor: crashReporterInit ( #16729 )
2019-02-05 12:56:44 -08:00
Milan Burda
7dc565fc2e
refactor: implement inspector APIs without the remote module ( #16607 )
2019-02-01 19:56:46 +01:00
Shelley Vohr
5a35c3a279
chore: fix promisify helper ( #16544 )
...
* chore: fix promise deprecation helper
* fix deprecations
* update deprecation tests
2019-01-25 14:23:24 -08:00
Milan Burda
713df08e3e
chore: remove deprecated modules internally using remote.require in sandboxed renderer context ( #15957 )
2019-01-24 10:53:52 -08:00
Milan Burda
fef262f829
fix: check process.isMainFrame in sandboxed_renderer/init.js ( #16500 )
2019-01-24 10:53:16 -08:00
Milan Burda
cc90919384
refactor: pass internal flag via IPC message struct for consistency ( #16490 )
2019-01-23 08:24:57 -08:00
Samuel Attard
58a6fe13d6
feat: preloads and nodeIntegration in iframes ( #16425 )
...
* feat: add support for node / preloads in subframes
This feature has delibrately been built / implemented in such a way
that it has minimum impact on existing apps / code-paths.
Without enabling the new "nodeSupportInSubFrames" option basically none of this
new code will be hit.
The things that I believe need extra scrutiny are:
* Introduction of `event.reply` for IPC events and usage of `event.reply` instead of `event.sender.send()`
* Usage of `node::FreeEnvironment(env)` when the new option is enabled in order to avoid memory leaks. I have tested this quite a bit and haven't managed to cause a crash but it is still feature flagged behind the "nodeSupportInSubFrames" flag to avoid potential impact.
Closes #10569
Closes #10401
Closes #11868
Closes #12505
Closes #14035
* feat: add support preloads in subframes for sandboxed renderers
* spec: add tests for new nodeSupportInSubFrames option
* spec: fix specs for .reply and ._replyInternal for internal messages
* chore: revert change to use flag instead of environment set size
* chore: clean up subframe impl
* chore: apply suggestions from code review
Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
* chore: clean up reply usage
* chore: fix TS docs generation
* chore: cleanup after rebase
* chore: rename wrap to add in event fns
2019-01-22 11:24:46 -08:00
Samuel Attard
ff9b23ebe5
fix: dont run window-setup on chrome:// protocol, introduced in b965e54efc
( #16489 )
2019-01-22 10:32:18 -08:00
Milan Burda
6cba2c50a2
feat: make ipc-message
and ipc-message-sync
events public ( #16468 )
2019-01-22 08:47:58 -08:00
Milan Burda
b965e54efc
fix: <webview> not working with contextIsolation + sandbox ( #16469 )
2019-01-22 10:08:16 +09:00
Shelley Vohr
441c9ce376
feat: promisify desktopCapturer.getSources ( #16427 )
...
* feat: promisify desktopCapturer.getSources
* fix doc
* fix docs lint error
2019-01-18 15:29:32 -08:00
Milan Burda
7d4a1223fd
feat: add preload-error
event to webContents
( #16411 )
2019-01-18 12:03:43 +01:00
Shelley Vohr
720197f9c8
fix: correctly handle IPC for promise-based methods ( #16433 )
2019-01-17 12:08:54 -08:00
Robo
52fe92d02e
feat: Upgrade to Chromium 71.0.3578.98 ( #15966 )
2019-01-11 17:00:43 -08:00
Milan Burda
fade3eb679
chore: make "nodeIntegration" and "webviewTag" default to false ( #16235 )
2019-01-07 22:19:27 +03:00
Milan Burda
3f1d22759a
refactor: use helpers for command-line parsing in renderer/init.js ( #16239 )
2019-01-03 11:22:34 -05:00
Milan Burda
547097b036
security: allow to block desktopCapturer.getSources() calls ( #15964 )
...
* security: allow to block desktopCapturer.getSources() calls
* return empty instead of error
* fix: release resources of DesktopCapturer on exit
2018-12-20 11:44:30 +09:00
Milan Burda
7a6fe00f49
chore: simplify code for modules internally using remote.require in sandbox ( #16104 )
2018-12-17 22:47:41 +03:00
Cheng Zhao
8584c2f14b
fix: register webview in main world when using contextIsolation ( #16067 )
2018-12-14 15:38:35 +09:00
Cheng Zhao
897c6e93cb
chore: simplify main world setup of contextIsolation ( #16046 )
2018-12-13 16:25:12 -05:00
Milan Burda
c65a0d90b8
chore: misc cleanup ( #16037 )
2018-12-12 15:31:16 -06:00
Milan Burda
177091ca6f
chore: rename nativeRequire to potentiallyRemoteRequire ( #15971 )
2018-12-06 18:12:50 -08:00
Milan Burda
ab2a061b59
refactor: use helpers when using the remote module in sandboxed renderers ( #15960 )
2018-12-05 10:07:32 -08:00
Milan Burda
d561c5531b
feat: deprecate modules internally using remote.require in sandboxed renderer context ( #15145 )
2018-12-05 10:34:09 +01:00
Milan Burda
aa2b2f7c8f
fix: security: don't allow arbitrary methods to be invoked on webContents via IPC ( #15919 )
2018-12-04 16:12:21 +01:00
Cheng Zhao
ca7dec2082
fix: default prop of location should be empty str
2018-12-04 17:11:26 +09:00
Cheng Zhao
fc4e10b6c0
fix: set setter of window.location
2018-12-04 16:23:52 +09:00
Anrock
e80e3a53e9
feat: introduce LocationProxy for BrowserWindowProxy
2018-12-04 16:23:52 +09:00
Julien Isorce
1f55f1635f
feat: add support for DesktopCapturerSource.appIcon
...
Useful to get the icon of the application owning the source.
Only available for sources of type window, i.e. not for screen.
https://github.com/electron/electron/issues/14845
2018-12-04 15:42:49 +09:00
Milan Burda
8483cb4aa7
security: only handle related IPCs when <webview> tag is enabled ( #15859 )
...
* refactor: move guest-view-manager related IPC handling out of rpc-server
* feat: only handle related IPCs when <webview> tag is enabled
2018-11-30 18:44:38 +09:00
Samuel Attard
fe8965efa2
fix: use sendToAll method correctly in chrome-api ( #15518 )
2018-11-01 07:16:49 -07:00
Cheng Zhao
a8f2646ba6
Fix missing remote object error when calling remote function created in preload script ( #15444 )
...
* fix: report wrong context error based on contextId
* fix: destroyed remote renderer warning is now async
2018-10-31 11:26:57 -04:00
Shelley Vohr
d21d83cfc8
fix: folder open not working in devtools ( #15387 )
2018-10-25 08:36:48 -07:00
Adam Meyer
d43ef97a7b
add width to webview iframe ( #15195 )
2018-10-17 09:33:31 +09:00
Milan Burda
70c49b78ae
fix: Memory > Profiles > Load in DevTools ( #15151 )
2018-10-14 17:30:49 +11:00
Milan Burda
d3efc52745
feat: add webPreferences.enableRemoteModule option ( #13028 )
2018-10-13 20:50:07 +03:00
Milan Burda
9177dbb584
refactor: use boolean for nodeIntegration / webviewTag ( #15005 )
2018-10-08 15:51:31 +02:00
Milan Burda
b50f86ef43
refactor: use separate ipc-renderer-internal / ipc-main-internal APIs for Electron internals ( #13940 )
2018-10-07 00:48:00 +13:00
Milan Burda
5efb0fdff1
feat: add security warnings to sandboxed renderers ( #14869 )
...
Also refactor not to use the remote module.
2018-10-03 21:36:12 +02:00
Milan Burda
3ad3ade828
refactor: add prefer-const to .eslintrc + fix errors ( #14880 )
2018-10-02 11:56:31 +10:00
Milan Burda
d48f9bcf7f
refactor: implement <webview> methods via dedicated IPCs without the remote module ( #14377 )
2018-10-01 10:07:50 +09:00
Milan Burda
c61db523c7
refactor: replace var with const / let ( #14866 )
2018-09-29 09:17:00 +10:00
Milan Burda
b499d57cfd
refactor: use error-utils for remote exception serialization / deserialization ( #14788 )
...
* refactor: use error-utils for remote exception serialization / deserialization
* fix internal process.type in sandboxed renderer
2018-09-26 15:44:55 +10:00
Samuel Attard
176a76217c
chore: have 'use strict' consistently across our lib files ( #14721 )
2018-09-23 00:28:50 +12:00
Samuel Attard
32a9df2940
refactor: clean up the default app implementation ( #14719 )
...
* Disable nodeIntegration
* Enable contextIsolation
* Re-implement the CSP security check to handle running in
contextIsolation
* Disable bad DCHECKS for the promise helper
* Remove the unused "-d" flag for the electron binary
* Added a way to hide the default help output for electron devs who
don't want to see it every time
2018-09-21 15:24:42 +10:00
Samuel Attard
54ef906832
[RFC] perf: use an internal module resolver to improve require performance ( #14633 )
...
* perf: use an internal module resolver instead of relative requires
* perf: memoize the results of getting exported Electron properties
* perf: make internal module changes consistent across sandboxed / bundled files
2018-09-20 13:43:26 +10:00
Samuel Attard
558fff69e7
chore: update to standard 12
2018-09-14 14:57:01 +10:00