Samuel Attard
d7f07e8a80
refactor: rename the atom directory to shell
2019-06-19 17:33:28 -07:00
Cheng Zhao
3142d5ca00
chore: support converting OnceCallback to V8 ( #17941 )
2019-04-25 09:40:27 +09:00
Cheng Zhao
671533f7d2
fix: check the result when calling js function ( #17443 )
...
* fix: check the result when calling js function
* test: should not crash when callback returns nothing
2019-03-20 08:27:06 -07:00
Jeremy Apthorp
d01db5a656
migrate to non-deprecated v8 functions
...
https://bugs.chromium.org/p/v8/issues/detail?id=8238
https://bugs.chromium.org/p/v8/issues/detail?id=7295
https://chromium-review.googlesource.com/c/v8/v8/+/1352273
2019-01-22 10:32:03 -08:00
Jeremy Apthorp
83d951db7e
chore: DCHECK that events are only emitted on the UI thread ( #15873 )
...
* chore: DCHECK that events are only emitted on the UI thread
* move dcheck to EmitWithEvent
2018-11-30 18:48:27 +09:00
Charles Kerr
859567983a
chore: run clang-format to clear linter for #14977 ( #14990 )
2018-10-05 10:38:27 -05:00
Cheng Zhao
d3ae541397
refactor: Clean up the implementation of the registerStreamProtocol ( #11357 )
...
* Use weak pointer to avoid race condition
* Use DeleteSoon to delete pointer across threads
* Simplify EventSubscriber
* No need to manually mange V8 convertions
* Fix cpplint warning
We should update cpplint for this, but let's do it in other PR.
* Move UI thread operations to EventSubscriber
* Less and more assertions
Some methods are now private so no more need to assert threads.
* Fix cpplint warnings
* No longer needs the EventEmitted
* EventSubscriber => StreamSubscriber
* Reduce the copies when passing data
* Fix cpplint warnings
2018-10-04 10:13:09 -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
Thiago de Arruda
64bfabdeba
Make BindFunctionWith function visible to other modules.
2017-11-13 15:21:22 -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
e496e18f6e
Make Archive thread safe
2017-03-20 12:52:46 -07:00
Cheng Zhao
69df934710
Converter for base::Callback is not thread safe
2017-03-20 12:52:45 -07:00
Cheng Zhao
ee28f4fc32
Handle v8::MicrotasksScope in the main process
2016-06-24 14:45:31 +09:00
Cheng Zhao
7ba391da7c
Update to API changes of Chrome 51
2016-05-23 10:59:39 +09:00
Cheng Zhao
73e7773d84
Update to API changes of Chrome 47
2015-12-07 19:56:23 +08:00
Cheng Zhao
e5358d405a
Make sure V8 Function passed to native code are destroyed on UI thread
2015-12-03 11:24:33 +08:00
Cheng Zhao
d70706f876
Make sure handles of callbacks are releases on exit
...
Some callbacks are stored in native resources that not managed by
JavaScript, so when those resources are destroyed the JavaScript context
may already be destroyed, and releasing callbacks then would result in
crash.
2015-11-06 21:00:32 +08:00
Cheng Zhao
54dad72d92
Don't leak TranslaterHolder
2015-10-28 19:54:59 +08:00
Cheng Zhao
3881ad1c4b
Don't leak FunctionTemplate when converting C++ callback
2015-10-28 19:54:59 +08:00
Robo
70fe169b0f
nativemate: use maybe version of v8::Function::Call to avoid exceptions
2015-10-26 10:59:40 +05:30
Cheng Zhao
1bb0dde360
Use WebScopedRunV8Script in converted C++ functions
2015-08-07 19:37:17 +08:00
Cheng Zhao
5c18d89453
Reimplement callback.h with C++11
2015-08-07 19:35:35 +08:00
Cheng Zhao
2ff104d012
Move callback converter from native mate to electron
2015-08-07 19:35:35 +08:00