Commit graph

454 commits

Author SHA1 Message Date
Cheng Zhao
136cf389e8 fix: use context counter as contextId (backport 3-0-x)
For sandboxed renderer it may not have a node::Environment in the context,
using a increasing counter as contextId works for all cases.
2018-07-19 11:27:41 -07:00
Cheng Zhao
adf49daaac fix double-freeing remote references
After the page does navigations, garbage collection can still happen in
the old context. This commit changes to store references to remote objects
by _pages_, instead of by _WebContents_.
2018-07-12 11:17:26 +09:00
Cheng Zhao
9431677e79 add API to return an unique ID for page 2018-07-12 11:16:13 +09:00
deepak1556
2f7c413199 v8: set fatal error handler per isolate 2018-06-19 11:49:42 +10:00
deepak1556
eab4227cbf Make Origin(const GURL&) constructor private.
https://chromium-review.googlesource.com/c/chromium/src/+/729284
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
4602d940cf Add missing header 2018-06-19 11:49:41 +10:00
Milan Burda
28fd571d0c refactoring: use std::make_unique<T> (#13245) 2018-06-18 16:32:55 +09:00
Alexey Kuzmin
dee9aef975 Add "enable_desktop_capturer" build flag (#13133)
* Make it possible to disable a module for a renderer

* Put DesktopCapturer API under a build flag

The name is "enable_desktop_capturer".
Enabled by default.
2018-06-13 11:15:34 -05:00
Thiago de Arruda
6ff111a141 perf: don't use JSON to send the result of ipcRenderer.sendSync. (#8953)
* Don't use JSON to send the result of `ipcRenderer.sendSync`.

- Change the return type of AtomViewHostMsg_Message_Sync from `base::string16`
  to `base::ListValue`
- Adjust lib/browser/api/web-contents.js and /lib/renderer/api/ipc-renderer.js
  to wrap/unwrap return values to/from array, instead of
  serializing/deserializing JSON.

This change can greatly improve `ipcRenderer.sendSync` calls where the return
value contains Buffer instances, because those are converted to Array before
being serialized to JSON(which has no efficient way of representing byte
arrays).

A simple benchmark where remote.require('fs') was used to read a 16mb file got
at least 5x faster, not to mention it used a lot less memory.  This difference
tends increases with larger buffers.

* Don't base64 encode Buffers

* Don't allocate V8ValueConverter on the heap

* Replace hidden global.sandbox with NodeBindings::IsInitialized()

* Refactoring: check NodeBindings::IsInitialized() in V8ValueConverter

* Refactor problematic test to make it more reliable

* Add tests for NaN and Infinity
2018-06-13 17:38:31 +10:00
Milan Burda
6ad0a22602 Add process.getHeapStatistics() (#13183) 2018-06-10 22:00:36 +10:00
Charles Kerr
b89fe86fa1
Merge pull request #13050 from electron/3.0.0-deprecations
chore: removal of 3.0.0 deprecations
2018-05-30 09:25:36 +02:00
Cheng Zhao
322bde526c Add LayoutManager/BoxLayout APIs 2018-05-24 15:36:29 +09:00
Shelley Vohr
22fed0c798
remove nativeImage.createFromBuffer() deprecation 2018-05-23 09:43:58 -07:00
Jeremy Apthorp
73ac019882 Fix up #includes to work with both GYP and GN 2018-05-10 13:38:40 -07:00
Alexey Kuzmin
3fd0ec99ae Better OSR tests (#12817)
* Add features.isOffscreenRenderingEnabled()

* Use .isOffscreenRenderingEnabled() to determine if OSR is available

* Add a helper closeTheWindow() function

* Skip OSR tests if they are disabled
2018-05-03 11:10:25 -05:00
Shelley Vohr
12a57ff1c2 clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
Jeremy Apthorp
a635f078c6 [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
Shelley Vohr
c6f4bbd143
also format missing .cc files 2018-04-18 20:48:45 -04:00
Shelley Vohr
53bdf22c85
clang-format atom files 2018-04-18 20:48:45 -04:00
Shelley Vohr
354f872919
run clang-format 2018-04-16 15:08:17 -04:00
Shelley Vohr
a19ddfc578
fix copy_to conditional 2018-04-16 12:14:35 -04:00
Shelley Vohr
90a7b5ebce
switch to simplified version of copy_to 2018-04-16 08:47:34 -04:00
Shelley Vohr
1727a9eca9
pull up definition and remove include 2018-04-14 21:23:05 -04:00
Shelley Vohr
8b4a89c445
.deepCopyTo() => sk_tool_utils::copy_to() 2018-04-14 12:50:55 -04:00
Robo
ad2baccefa tools: pass custom template for js2c (#12593)
* Update node v9.7.0 ref

* tools: pass custom template to node/tools/js2c.py
2018-04-13 08:20:04 -04:00
Robo
c1404ff2c1 vendor: Update native mate to fix v8 DCHECK crash (#12534)
* update native_mate ref

* Remove MarkHighMemoryUsage api
2018-04-05 00:47:18 -05:00
deepak1556
e24c0dda5d add features module to detect availability of build time features at runtime 2018-03-20 10:13:17 +03:00
Cheng Zhao
624e09533c Avoid using deprecated skia size methods 2018-03-20 10:13:16 +03:00
deepak1556
719980a948 REVIEW: remove device emulation ipc dependecny on rvh 2018-03-20 10:13:15 +03:00
deepak1556
5684f8886f REVIEW: move ipc use from rvh to rfh 2018-03-20 10:13:15 +03:00
Samuel Attard
41b9825f00 WebContents are no longer IPC Sender's 2018-03-20 10:08:58 +03:00
Samuel Attard
8664dd2139
Merge pull request #12190 from electron/fix-double-preload-master
Ensure that a document has been created before sending IPC messages
2018-03-14 10:34:05 +09:00
deepak1556
3cfe66e4c3 move ipc use from rvh to rfh 2018-03-09 15:01:09 +05:30
Cheng Zhao
e79b18762e Enter context scope before InternalCallbackScope 2018-03-09 16:14:24 +09:00
Cheng Zhao
5d2452608d Use InternalCallbackScope for ticking event loop 2018-03-09 15:23:40 +09:00
Shelley Vohr
1882b88c78 clean node ref and remove short circuit 2018-03-09 15:23:39 +09:00
Shelley Vohr
c8ef15cf40 update node::Environment::TickInfo calls 2018-03-09 15:23:39 +09:00
shelley vohr
0e5b6f9300 Upgrade to node v9.3.0 (#11507)
* update submodule refs for node v9.3.0

* Define "llvm_version" for Node.js build

* NODE_MODULE_CONTEXT_AWARE_BUILTIN -> NODE_BUILTIN_MODULE_CONTEXT_AWARE

* update NodePlatform to MultiIsolatePlatform

* fix linting error

* update node ref

* REVIEW: Explicitly register builtin modules

https://github.com/nodejs/node/pull/16565

* update libcc ref

* switch libcc to c62

* REVIEW: Address node api changes

- Always start the inspector agent for https://github.com/nodejs/node/pull/17085
- Set the tracing controller for node https://github.com/nodejs/node/pull/15538
- Isolate data creation now requires plaform https://github.com/nodejs/node/pull/16700
2018-02-23 10:22:00 +09:00
deepak1556
25d966110e FIXME: PDF component IPC should be converted to Mojo.
https://codereview.chromium.org/2455543002
2018-02-23 10:21:23 +09:00
deepak1556
e03f7baa60 gfx::Image::SwapRepresentations is removed in favor of std::move
https://chromium-review.googlesource.com/c/chromium/src/+/588033
2018-02-23 10:21:23 +09:00
shelley vohr
7bcccdec41 remove atom-shell process name (#11979) 2018-02-20 10:33:38 -06:00
shelley vohr
6a3fde6e20
Merge pull request #11973 from electron/remove-clipboard-methods
Remove html/rtf methods marked for 2.0
2018-02-20 11:21:10 -05:00
shelley vohr
a2856db982 Remove nativeImage deprecated methods (#11978)
* remove deprecated nativeimage methods

* remove .only from spec
2018-02-20 09:15:27 -06:00
Shelley Vohr
e4e20d667b
remove html/rtf methods marked for 2.0 2018-02-20 08:41:58 -05:00
Shelley Vohr
fc025064f7
remove setExtraParameter for 2.0 2018-02-20 08:26:10 -05:00
Cheng Zhao
4298aecb7c
Merge pull request #11547 from electron/draggable_regions_patch
fix: draggable region ipc should be frame based
2018-01-07 21:15:50 +09:00
deepak1556
1d95241185 FIXME: refactor and remove usage of ScopedAllowIO where possible 2018-01-02 16:37:06 +09:00
deepak1556
99e26b8318 fix: draggable region ipc should be frame based 2018-01-01 22:54:02 +05:30
Aleksei Kuzmin
b9ed7380aa Explicitly set alpha type of bitmaps with JPEG data to opaque
Actually fixes #11245.
2017-11-30 17:56:32 +01:00
Aleksei Kuzmin
89c1b8043f Do not use SkBitmap.deepCopyTo(), it was removed
Copy of the `sk_tool_utils::copy_to()` is used instead.
Probsbly we should use the function itself.
2017-11-24 10:58:17 +09:00