Commit graph

23 commits

Author SHA1 Message Date
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
deepak1556
3cfe66e4c3 move ipc use from rvh to rfh 2018-03-09 15:01:09 +05:30
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
99e26b8318 fix: draggable region ipc should be frame based 2018-01-01 22:54:02 +05:30
Heilig Benedek
192cd7787b move popup related code to nativewindow 2017-05-26 03:39:36 +02:00
Heilig Benedek
f360104bee add datalist element view 2017-05-19 21:36:37 +02:00
gellert
155fef99ae adds offscreen renderer ipc message to disable external popups 2017-05-10 22:19:05 +02:00
deepak1556
e3fe3cc490 map webframe zoom api to use HostZoomMap 2017-02-12 00:49:17 +05:30
Cheng Zhao
5dabc47440 Remove the view-painted event 2016-08-03 16:20:55 +09:00
liusi
d335d7d706 add "view-painted" event to WebContent. 2016-07-18 14:54:52 +08:00
Cheng Zhao
9ab76fb884 Add webContents.sendToAll to send message to all frames 2016-05-27 16:58:49 +09:00
Cheng Zhao
4fb9e20c33 Add API to set render process preferences 2016-05-27 08:51:02 +09:00
Cheng Zhao
af02739c4e Change webview's zoom level on JavaScript side 2016-01-13 12:50:02 +08:00
Cheng Zhao
55dfddba77 Handle executeJavaScript in JavaScript 2016-01-13 12:11:46 +08:00
Robo
7756bb6762 webcontents: notify guests of embedders' zoom level change 2015-10-08 10:38:22 +05:30
Robo
239d535cac render: executejavascript with option to simulate usergesture 2015-07-30 15:38:46 +05:30
Kevin Sawicki
b6b6fc3bfd Remove All Rights Reserved after GitHub copyright
Closes #762
2014-10-31 11:17:05 -07:00
Cheng Zhao
32dff999a5 Fix API changes of Chrome 38 2014-10-11 19:11:34 +08:00
Cheng Zhao
e0e1d45859 Rename string16 to base::string16. 2014-06-28 19:49:22 +08:00
Pascal Borreli
831c7f5924 Fixed typos 2014-05-07 07:34:53 +01:00
Cheng Zhao
f176b2c58f Switch to use MIT license. 2014-05-04 20:29:08 +08:00
Cheng Zhao
b6ac06c022 Order header files. 2014-03-16 09:37:04 +08:00
Cheng Zhao
516d46444d Move all sources under atom/. 2014-03-16 08:30:26 +08:00
Renamed from common/api/api_messages.h (Browse further)