GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: get binding data store directly from the realm · nodejs/node@d358317

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_realm-inl.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_realm-inl.h‎

Copy file name to clipboardExpand all lines: src/node_realm-inl.h
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ inline T* Realm::AddBindingData(v8::Local<v8::Context> context,
8888
// This won't compile if T is not a BaseObject subclass.
8989
BaseObjectPtr<T> item =
9090
MakeDetachedBaseObject<T>(this, target, std::forward<Args>(args)...);
91-
BindingDataStore* map =
92-
static_cast<BindingDataStore*>(context->GetAlignedPointerFromEmbedderData(
93-
ContextEmbedderIndex::kBindingDataStoreIndex));
94-
DCHECK_NOT_NULL(map);
91+
DCHECK_EQ(context->GetAlignedPointerFromEmbedderData(
92+
ContextEmbedderIndex::kBindingDataStoreIndex),
93+
&binding_data_store_);
9594
constexpr size_t binding_index = static_cast<size_t>(T::binding_type_int);
9695
static_assert(binding_index < std::tuple_size_v<BindingDataStore>);
97-
CHECK(!(*map)[binding_index]); // Should not insert the binding twice.
98-
(*map)[binding_index] = item;
96+
// Should not insert the binding twice.
97+
CHECK(!binding_data_store_[binding_index]);
98+
binding_data_store_[binding_index] = item;
9999
DCHECK_EQ(GetBindingData<T>(context), item.get());
100100
return item.get();
101101
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.