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

19 Коммитов

Автор SHA1 Сообщение Дата
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
Jeremy Apthorp 73ac019882 Fix up #includes to work with both GYP and GN 2018-05-10 13:38:40 -07:00
Shelley Vohr 53bdf22c85
clang-format atom files 2018-04-18 20:48:45 -04: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
Charles Kerr 435c9c1486 Force uv loop cleanup (#11465)
* ensure all uv handles are closed before ending worker's loop

* add DCHECK to test that the Worker loop is finished

* don't call deprecated uv_loop_new(), uv_loop_delete()

* make cpplint happy

* fix comment error

* empty commit for CI

* tweak DCHECK expression

* extract-method: stop_and_close_uv_loop()

* fix DCHECK oops
2018-01-04 11:16:06 -08:00
Cheng Zhao c068285ff8 AtomBindings should not use default uv loop 2017-03-20 12:52:46 -07:00
Cheng Zhao b467c3939e Add a new type of NodeBindings 2017-03-20 12:52:45 -07:00
Cheng Zhao 6d5339b74e insertText is deprecated 2017-02-06 10:34:29 -08:00
Kevin Sawicki c374e37cc4 Leak IsolateData since Environment is also leaked 2017-01-19 09:05:59 +02:00
Kevin Sawicki 54e2c480cb Upgrade to node 7.4 2017-01-19 09:05:59 +02:00
Cheng Zhao 497f5a1199 Update files for Chrome 54 API changes 2017-01-19 09:05:59 +02:00
Paul Betts d2944c62a5 basictypes.h => macros.h 2016-03-10 17:06:21 +09:00
Cheng Zhao 54ab6744f1 Remove some unused virtual functions 2015-01-23 21:05:32 -08:00
Cheng Zhao 5e58915bdd Separate LoadEnvironment from CreateEnvironment 2015-01-21 14:00:19 -08:00
Kevin Sawicki b6b6fc3bfd Remove All Rights Reserved after GitHub copyright
Closes #762
2014-10-31 11:17:05 -07:00
Cheng Zhao cd4c5d976b Adapt to API changes of Chromium and node. 2014-06-28 22:33:00 +08:00
Cheng Zhao f176b2c58f Switch to use MIT license. 2014-05-04 20:29:08 +08:00
Cheng Zhao 516d46444d Move all sources under atom/. 2014-03-16 08:30:26 +08:00