Commit graph

3 commits

Author SHA1 Message Date
Robo
d4d6b9862f
fix: make StreamSubscriber ref counted ()
It is owned by URLRequestStreamJob on the IO thread once request starts,
but if the ownership was abondoned while transfering it to IO thread
which is possible when a request is aborted, then we need to make sure
its destroyed on the right thread to avoid lock in v8.
2019-03-07 20:50:03 +05:30
Charles Kerr
859567983a
chore: run clang-format to clear linter for () 2018-10-05 10:38:27 -05:00
Cheng Zhao
d3ae541397 refactor: Clean up the implementation of the registerStreamProtocol ()
* 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