31
31
#include " uv.h"
32
32
#include " v8.h"
33
33
#include " node_perf_common.h"
34
+ #include " node_context_data.h"
34
35
35
36
#include < stddef.h>
36
37
#include < stdint.h>
@@ -283,7 +284,8 @@ inline void Environment::TickInfo::set_has_thrown(bool state) {
283
284
284
285
inline void Environment::AssignToContext (v8::Local<v8::Context> context,
285
286
const ContextInfo& info) {
286
- context->SetAlignedPointerInEmbedderData (kContextEmbedderDataIndex , this );
287
+ context->SetAlignedPointerInEmbedderData (
288
+ ContextEmbedderIndex::kEnvironment , this );
287
289
#if HAVE_INSPECTOR
288
290
inspector_agent ()->ContextCreated (context, info);
289
291
#endif // HAVE_INSPECTOR
@@ -295,7 +297,8 @@ inline Environment* Environment::GetCurrent(v8::Isolate* isolate) {
295
297
296
298
inline Environment* Environment::GetCurrent (v8::Local<v8::Context> context) {
297
299
return static_cast <Environment*>(
298
- context->GetAlignedPointerFromEmbedderData (kContextEmbedderDataIndex ));
300
+ context->GetAlignedPointerFromEmbedderData (
301
+ ContextEmbedderIndex::kEnvironment ));
299
302
}
300
303
301
304
inline Environment* Environment::GetCurrent (
@@ -368,8 +371,8 @@ inline Environment::~Environment() {
368
371
inspector_agent_.reset ();
369
372
#endif
370
373
371
- context ()->SetAlignedPointerInEmbedderData (kContextEmbedderDataIndex ,
372
- nullptr );
374
+ context ()->SetAlignedPointerInEmbedderData (
375
+ ContextEmbedderIndex:: kEnvironment , nullptr );
373
376
374
377
delete[] heap_statistics_buffer_;
375
378
delete[] heap_space_statistics_buffer_;
0 commit comments