Commit graph

232 commits

Author SHA1 Message Date
Milan Burda
28fd571d0c refactoring: use std::make_unique<T> (#13245) 2018-06-18 16:32:55 +09: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
2337237d58 Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
Milan Burda
850051463b don't use native_mate/compat.h macros (#12984) 2018-05-18 09:08:28 +09:00
Milan Burda
6a4d9309b2 Remove unnecessary heap allocations of atom::V8ValueConverter instances (#12924) 2018-05-15 09:21:23 -05: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
ca406637af
add converters for base::BindOnce and base::BindRepeating 2018-04-17 18:47:12 -04:00
Shelley Vohr
d722008367
remove unnecessary ptr_util.h include 2018-04-12 22:34:26 -04:00
Shelley Vohr
b05932310b
replace base::MakeUnique with std::make_unique 2018-04-12 08:48:32 -04:00
Jeremy Apthorp
f0d08f4da1 Propagate referrer to new windows (#12397)
* Propagate referrer to new windows

Fixes #9205

* Rearrange -new-window event arguments for backwards-compatibility

* Plumb referrer policy through guest-window-manager

* Document the Referrer structure and its uses

* Add tests for referrer in new windows

* Docs nits
2018-04-05 18:13:24 -05:00
Samuel Attard
7356be0164 Convert optional webpoint 2018-03-20 10:13:14 +03:00
deepak1556
d846c9006e Replace somemore uses of SetStringWithoutPathExpansion 2018-02-23 10:21:24 +09:00
deepak1556
fedf1d889b handle NaN conversion from V8 2018-01-02 16:37:06 +09:00
Aleksei Kuzmin
47d683f0ad DevTools: do not set visible size while emulating in case of device mode.
https://chromium-review.googlesource.com/c/chromium/src/+/572222
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
f03ca53af5 Add blink::WebInputEvent::IsPinchGestureEventType().
https://codereview.chromium.org/2861373004
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
ba6e8b4dff Merge ResourceRequestBodyImpl and ResourceRequestBody.
https://codereview.chromium.org/2954343005
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
7ad524fa34 Make base::DictionaryValue::Set* return pointers
https://codereview.chromium.org/2850773002
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
58e0771e47 Remove base::Value::Get{Buffer,Size}
https://codereview.chromium.org/2841623003
2017-11-24 10:58:15 +09:00
Thiago de Arruda
64bfabdeba Make BindFunctionWith function visible to other modules. 2017-11-13 15:21:22 -03:00
Thiago de Arruda
32113bf7f9 Implement V8 -> C++ conversion of net::HttpResponseHeaders. 2017-11-13 15:20:40 -03:00
Thiago de Arruda
9c04d18387 Modify FillRequestDetails to pass headers dictionary. 2017-11-13 15:19:59 -03:00
Aleksei Kuzmin
627eb30409 The Blink Rename 2017-08-15 16:19:21 +03:00
Tony Ganch
90574160db Replace x/y in WebMouseEvent with proper getters/setters 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
cc350efbd8 Remove base::BinaryValue
https://codereview.chromium.org/2799093006
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
3d700ee49f Remove base::Value::CreateNullValue
https://codereview.chromium.org/2792573002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
a20f633272 Remove base::StringValue
https://codereview.chromium.org/2664753002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
7a4ca08a8d The Blink Rename 2017-08-15 16:19:20 +03:00
Cheng Zhao
0ee2ab8a6e Fix accessing empty vector in V8FunctionInvoker 2017-07-31 16:47:14 +09:00
Ales Pergl
440b238157 Fixed build issues in debug mode 2017-06-30 12:28:01 +02:00
Cheng Zhao
301ed2d66c Fix typo when updating code 2017-04-27 16:34:52 +09:00
Cheng Zhao
b3d60bfb3a Fix building on Linux 2017-04-27 16:34:52 +09:00
Cheng Zhao
481b04358e Fix blink API changes 2017-04-27 16:34:52 +09:00
Cheng Zhao
6be10ffef2 Fix more API changes due to name changes 2017-04-27 16:34:52 +09:00
Cheng Zhao
50e3bfa764 Fix API changes of base::Value 2017-04-27 16:34:52 +09:00
Cheng Zhao
fc2d62d5cb Fix API changes of Chrome58 2017-04-27 16:34:52 +09:00
Kevin Sawicki
3e9014c371 Merge pull request #9099 from electron/certificate-trust
macOS: Add certificate trust API
2017-04-04 11:17:09 -07:00
joshaber
736d6afe73 As you wish linter 2017-04-04 09:23:30 -04:00
joshaber
0cab8a3322 Put CertFromData in an anon namespace 2017-04-04 09:19:23 -04:00
joshaber
370cf815d9 Get rid of intermediates and rehydrate from issuerCert 2017-04-03 16:27:53 -04:00
joshaber
b0ef7ddf44 Use better iteration 2017-04-03 15:28:51 -04:00
joshaber
ee7389bb6d Rename to make VS happy 2017-03-31 22:57:56 -04:00
joshaber
bde2a597f3 Decode all the intermediates 2017-03-31 21:27:49 -04:00
joshaber
69defc5166 Encode all the intermediates 2017-03-31 21:27:33 -04:00
joshaber
302ca8669d Slightly better conversion 2017-03-31 15:44:47 -04:00
joshaber
141a5ad73f Maybe this is a valid conversion? 2017-03-31 14:16:26 -04:00
Haojian Wu
8ae91682cb Lines should be <= 80 characters. 2017-03-31 20:09:13 +02:00
joshaber
deae70de4d Dummy out the certificate FromV8 converter 2017-03-31 13:53:31 -04:00
Haojian Wu
e8abee9ca9 Replace C-style casts with static_cast. 2017-03-30 23:05:47 +02:00
Cheng Zhao
e496e18f6e Make Archive thread safe 2017-03-20 12:52:46 -07:00