-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert TracedReference deref API removal
This API was removed in V8 12.7, but we don't know how to safely replace our use of it yet.
- Loading branch information
1 parent
4e80382
commit 7a77689
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
patches/v8/0017-Revert-TracedReference-deref-API-removal.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From e35a1f2acb6b61c1a74788c7e772376e307f9aba Mon Sep 17 00:00:00 2001 | ||
From: Harris Hancock <harris@cloudflare.com> | ||
Date: Fri, 28 Jun 2024 14:19:25 +0100 | ||
Subject: Revert TracedReference deref API removal | ||
|
||
This previously-deprecated API was removed in 7cd2b0c434bd5ea7bd253a97958c7348557fd72e, but we don't know how to safely replace our usage of it yet. | ||
|
||
diff --git a/include/v8-traced-handle.h b/include/v8-traced-handle.h | ||
index 04752c4f2aeed025364326fb0a0d85c03ba3347c..f1a41b1d8cd756358b536ee90ca9bd8c6b601e69 100644 | ||
--- a/include/v8-traced-handle.h | ||
+++ b/include/v8-traced-handle.h | ||
@@ -135,6 +135,17 @@ class BasicTracedReference : public TracedReferenceBase { | ||
const_cast<BasicTracedReference<T>&>(*this)); | ||
} | ||
|
||
+ V8_DEPRECATED("Use Get to convert to Local instead") | ||
+ V8_INLINE T* operator->() const { | ||
+#ifdef V8_ENABLE_CHECKS | ||
+ CheckValue(); | ||
+#endif // V8_ENABLE_CHECKS | ||
+ return this->template value<T>(); | ||
+ } | ||
+ | ||
+ V8_DEPRECATED("Use Get to convert to Local instead") | ||
+ V8_INLINE T* operator*() const { return this->operator->(); } | ||
+ | ||
private: | ||
/** | ||
* An empty BasicTracedReference without storage cell. |