summaryrefslogtreecommitdiff
path: root/test/cctest
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2018-05-16 15:22:56 -0700
committerAli Ijaz Sheikh <ofrobots@google.com>2018-05-21 11:16:44 -0700
commit32873c5f9bc6e13b9cdff220b50bafeb3a1a2dec (patch)
tree21f9c34f010ff5b9d167b0b4c7653d3bce0ce358 /test/cctest
parent9c2e67ba97a4af0bb83c621b0c724f84198eac2d (diff)
downloadandroid-node-v8-32873c5f9bc6e13b9cdff220b50bafeb3a1a2dec.tar.gz
android-node-v8-32873c5f9bc6e13b9cdff220b50bafeb3a1a2dec.tar.bz2
android-node-v8-32873c5f9bc6e13b9cdff220b50bafeb3a1a2dec.zip
src: trace_events: background thread events
V8 uses a thread pool provided by the host to schedule background tasks for concurrent GC and compiation. Emit trace events to identify the background threads. Ensure that the tracing infrastructure is started before the thread pool is initialized. PR-URL: https://github.com/nodejs/node/pull/20823 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/cctest')
-rw-r--r--test/cctest/node_test_fixture.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cctest/node_test_fixture.h b/test/cctest/node_test_fixture.h
index e0740a4709..f43cb56cd3 100644
--- a/test/cctest/node_test_fixture.h
+++ b/test/cctest/node_test_fixture.h
@@ -64,12 +64,12 @@ class NodeTestFixture : public ::testing::Test {
v8::Isolate* isolate_;
static void SetUpTestCase() {
- platform.reset(new node::NodePlatform(4, nullptr));
tracing_controller.reset(new v8::TracingController());
- allocator.reset(v8::ArrayBuffer::Allocator::NewDefaultAllocator());
- params.array_buffer_allocator = allocator.get();
node::tracing::TraceEventHelper::SetTracingController(
tracing_controller.get());
+ platform.reset(new node::NodePlatform(4, nullptr));
+ allocator.reset(v8::ArrayBuffer::Allocator::NewDefaultAllocator());
+ params.array_buffer_allocator = allocator.get();
CHECK_EQ(0, uv_loop_init(&current_loop));
v8::V8::InitializePlatform(platform.get());
v8::V8::Initialize();