| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c4596b9 commit d358317
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,14 +88,14 @@ inline T* Realm::AddBindingData(v8::Local<v8::Context> context, | |||
| 88 | 88 | // This won't compile if T is not a BaseObject subclass. | |
| 89 | 89 | BaseObjectPtr<T> item = | |
| 90 | 90 | 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_); | ||
| 95 | 94 | constexpr size_t binding_index = static_cast<size_t>(T::binding_type_int); | |
| 96 | 95 | 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; | ||
| 99 | 99 | DCHECK_EQ(GetBindingData<T>(context), item.get()); | |
| 100 | 100 | return item.get(); | |
| 101 | 101 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments