@@ -14,6 +14,7 @@ extern uintptr_t |
14 | 14 | nodedbg_offset_Environment__handle_wrap_queue___Environment_HandleWrapQueue; |
15 | 15 | extern int debug_symbols_generated; |
16 | 16 | extern int nodedbg_const_ContextEmbedderIndex__kEnvironment__int; |
| 17 | +extern int nodedbg_const_BaseObject__kInternalFieldCount__int; |
17 | 18 | extern uintptr_t |
18 | 19 | nodedbg_offset_Environment_HandleWrapQueue__head___ListNode_HandleWrap; |
19 | 20 | extern uintptr_t |
@@ -68,6 +69,12 @@ TEST_F(DebugSymbolsTest, ContextEmbedderEnvironmentIndex) { |
68 | 69 | kEnvironmentIndex); |
69 | 70 | } |
70 | 71 |
|
| 72 | +TEST_F(DebugSymbolsTest, BaseObjectkInternalFieldCount) { |
| 73 | + int kInternalFieldCount = node::BaseObject::kInternalFieldCount; |
| 74 | + EXPECT_EQ(nodedbg_const_BaseObject__kInternalFieldCount__int, |
| 75 | + kInternalFieldCount); |
| 76 | +} |
| 77 | + |
71 | 78 | TEST_F(DebugSymbolsTest, ExternalStringDataOffset) { |
72 | 79 | EXPECT_EQ(nodedbg_offset_ExternalString__data__uintptr_t, |
73 | 80 | NODE_OFF_EXTSTR_DATA); |
@@ -89,7 +96,8 @@ TEST_F(DebugSymbolsTest, BaseObjectPersistentHandle) { |
89 | 96 | Env env{handle_scope, argv}; |
90 | 97 |
|
91 | 98 | v8::Local<v8::ObjectTemplate> obj_templ = v8::ObjectTemplate::New(isolate_); |
92 | | - obj_templ->SetInternalFieldCount(1); |
| 99 | + obj_templ->SetInternalFieldCount( |
| 100 | + nodedbg_const_BaseObject__kInternalFieldCount__int); |
93 | 101 |
|
94 | 102 | v8::Local<v8::Object> object = |
95 | 103 | obj_templ->NewInstance(env.context()).ToLocalChecked(); |
@@ -139,7 +147,8 @@ TEST_F(DebugSymbolsTest, HandleWrapList) { |
139 | 147 | uv_tcp_t handle; |
140 | 148 |
|
141 | 149 | auto obj_template = v8::FunctionTemplate::New(isolate_); |
142 | | - obj_template->InstanceTemplate()->SetInternalFieldCount(1); |
| 150 | + obj_template->InstanceTemplate()->SetInternalFieldCount( |
| 151 | + nodedbg_const_BaseObject__kInternalFieldCount__int); |
143 | 152 |
|
144 | 153 | v8::Local<v8::Object> object = obj_template->GetFunction(env.context()) |
145 | 154 | .ToLocalChecked() |
@@ -171,7 +180,8 @@ TEST_F(DebugSymbolsTest, ReqWrapList) { |
171 | 180 | tail = *reinterpret_cast<uintptr_t*>(tail); |
172 | 181 |
|
173 | 182 | auto obj_template = v8::FunctionTemplate::New(isolate_); |
174 | | - obj_template->InstanceTemplate()->SetInternalFieldCount(1); |
| 183 | + obj_template->InstanceTemplate()->SetInternalFieldCount( |
| 184 | + nodedbg_const_BaseObject__kInternalFieldCount__int); |
175 | 185 |
|
176 | 186 | v8::Local<v8::Object> object = obj_template->GetFunction(env.context()) |
177 | 187 | .ToLocalChecked() |
|