Shelley Vohr
003a92e099
refactor: remove deprecated GetAs methods ( #13425 )
...
* refactor: remove deprecated GetAs methods
* restructure URLRequestAsyncAsarJob on win
* fix: add string conversion header
2018-06-27 14:52:48 -07:00
Shelley Vohr
e9971173d4
fix: inline vector allocation ( #13449 )
...
* fix: inline vector allocation
* remove size_t static cast
2018-06-27 12:57:10 -07:00
Shelley Vohr
1dde9492c9
refactor: remove deprecated CreateWithCopiedBuffer ( #13436 )
...
* refactor: remove deprecated CreateWithCopiedBuffer
* fix: add missing vector includes
* fix std::vector<char> allocation
2018-06-26 15:08:27 -07:00
Aleksei Kuzmin
e1f25253db
REVIEW: Don't use removed and deprecated Value::To* APIs
...
See https://chromium-review.googlesource.com/848782 for removed APIs.
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
a218c9696c
Fix error: no matching constructor for initialization of 'v8::TryCatch'
...
The deprecated constructor has been removed
in https://chromium-review.googlesource.com/848782
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
2c4bbacec1
Remove base::Value::GetType()
...
https://chromium-review.googlesource.com/718458
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
a315d6330c
Remove base::Value::IsType
...
https://chromium-review.googlesource.com/659798
2018-06-19 11:49:40 +10:00
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
Shelley Vohr
c6f4bbd143
also format missing .cc files
2018-04-18 20:48:45 -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
deepak1556
fedf1d889b
handle NaN conversion from V8
2018-01-02 16:37:06 +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
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
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
Thiago de Arruda
a6e4867111
Handle Buffer deserialization in sandboxed renderers
...
In sandboxed renderers we use browserify to provide a node-like environment. The
Buffer class used by browserify is actually just a wrapper around Uint8Array,
but to deserialize Buffer correctly we must expose the class as a hidden value
and use it in V8ValueConverter.
2017-03-16 13:20:09 -03:00
Cheng Zhao
a98e69a80d
Work around the compilation error of v8_value_converter.cc
...
We should apply this patch in future:
0232f57400
%5E%21/
2017-02-06 10:34:29 -08:00
Cheng Zhao
f28e8d7168
Fix API changes of Chrome 53
2016-09-14 16:22:43 +09:00
Kevin Sawicki
8a9776b227
Move IsExternal check to FromV8ValueImpl
2016-08-30 08:51:22 -07:00
Kevin Sawicki
58fc1b7933
Ignore external values when serializing
2016-08-29 10:38:16 -07:00
Kevin Sawicki
4579ec6094
Don't convert values with internal fields
2016-08-29 10:38:16 -07:00
Kevin Sawicki
50e2e26e4f
Improve cycle detection in V8ValueConverter
2016-08-25 09:26:07 -07:00
Kevin Sawicki
42a1136c88
Remove HasRealNamedCallbackProperty check
2016-08-08 09:35:40 -07:00
Cheng Zhao
b57665330c
Merge branch 'master' into chrome52
2016-07-21 05:34:36 -06:00
Cheng Zhao
39bd2bee8e
Avoid using CHECK in files using node headesr
...
Node has its own CHECK macro which requires linking with node::Assert.
2016-07-21 16:56:48 +09:00
Cheng Zhao
7d42797c1f
Update node headers including
2016-07-21 00:57:34 -06:00
Haojian Wu
04f9d35312
Modernize to C++11: Use auto
key to improve code readability and maintainability.
2016-07-10 13:11:47 +02:00
Haojian Wu
fab02809c6
Modernize to C++11: NULL => nullptr.
...
No functional change.
2016-07-10 11:57:04 +02:00
Cheng Zhao
1ba3907038
Update to API changes of Chrome 52
2016-07-04 15:32:43 +09:00
Cheng Zhao
06800940ec
Fix cpplint warnings
2016-05-23 13:03:43 +09:00
Cheng Zhao
7ba391da7c
Update to API changes of Chrome 51
2016-05-23 10:59:39 +09:00
Cheng Zhao
5fae63a2f5
Fix compilation errors on OS X
2016-03-10 17:06:21 +09:00
Paul Betts
4503aafe64
int32 => int32_t
2016-03-10 17:06:21 +09:00
Robo
a1a17b7ee8
use v8::Object::Get
2016-02-25 11:21:21 +05:30
Robo
467870deb6
use builtin method
2016-02-24 16:30:23 +05:30
Robo
367d12402a
ipc: allow passing date instances
2016-02-23 16:23:15 +05:30
Robo
5ff97c686a
nativemate: handle binary types in v8 value conversion
2015-10-13 01:13:59 +05:30
Cheng Zhao
f7c75d36ba
Do not create remote object for simple return values of APIs
2015-08-27 16:14:53 +08:00
Robo
be18a114e2
nativemate: increase recursion depth
2015-08-26 15:52:28 +05:30
Cheng Zhao
ebb1ddc0df
Support converting Buffer to Value
2015-08-12 15:39:33 +08:00
Haojian Wu
8fda175264
Update base::Value::CreateNullValue API changes.
2015-08-11 09:48:29 +08:00
Cheng Zhao
d78efe7c22
Use Local instead of Handle
2015-05-22 19:11:22 +08:00
Cheng Zhao
506237f5d6
Bump v0.20.5
2015-01-07 23:27:58 -08:00