| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 00e1c7e commit 577ff9f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | 37 | # Reset this number to 0 on major V8 upgrades. | |
| 38 | 38 | # Increment by one for each non-official patch applied to deps/v8. | |
| 39 | - 'v8_embedder_string': '-node.19', | ||
| 39 | + 'v8_embedder_string': '-node.20', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2610,10 +2610,7 @@ class StrongRootBlockAllocator { | |||
| 2610 | 2610 | using size_type = size_t; | |
| 2611 | 2611 | using difference_type = ptrdiff_t; | |
| 2612 | 2612 | template <class U> | |
| 2613 | - struct rebind { | ||
| 2614 | - STATIC_ASSERT((std::is_same<Address, U>::value)); | ||
| 2615 | - using other = StrongRootBlockAllocator; | ||
| 2616 | - }; | ||
| 2613 | + struct rebind; | ||
| 2617 | 2614 | ||
| 2618 | 2615 | explicit StrongRootBlockAllocator(Heap* heap) : heap_(heap) {} | |
| 2619 | 2616 | ||
@@ -2624,6 +2621,23 @@ class StrongRootBlockAllocator { | |||
| 2624 | 2621 | Heap* heap_; | |
| 2625 | 2622 | }; | |
| 2626 | 2623 | ||
| 2624 | + // Rebinding to Address gives another StrongRootBlockAllocator. | ||
| 2625 | + template <> | ||
| 2626 | + struct StrongRootBlockAllocator::rebind<Address> { | ||
| 2627 | + using other = StrongRootBlockAllocator; | ||
| 2628 | + }; | ||
| 2629 | + | ||
| 2630 | + // Rebinding to something other than Address gives a std::allocator that | ||
| 2631 | + // is copy-constructable from StrongRootBlockAllocator. | ||
| 2632 | + template <class U> | ||
| 2633 | + struct StrongRootBlockAllocator::rebind { | ||
| 2634 | + class other : public std::allocator<U> { | ||
| 2635 | + public: | ||
| 2636 | + // NOLINTNEXTLINE | ||
| 2637 | + other(const StrongRootBlockAllocator&) {} | ||
| 2638 | + }; | ||
| 2639 | + }; | ||
| 2640 | + | ||
| 2627 | 2641 | } // namespace internal | |
| 2628 | 2642 | } // namespace v8 | |
| 2629 | 2643 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments