Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: third_party/WebKit/Source/platform/heap/Handle.h

Issue 1923813002: Introduce wrapPersistent()/wrapCrossThreadPersistent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/Handle.h
diff --git a/third_party/WebKit/Source/platform/heap/Handle.h b/third_party/WebKit/Source/platform/heap/Handle.h
index 69cb7575950ac9f977932624164767e83a43e6da..5881ba1a2d8820f48b4b6b47cdada1edbd9d3e73 100644
--- a/third_party/WebKit/Source/platform/heap/Handle.h
+++ b/third_party/WebKit/Source/platform/heap/Handle.h
@@ -1064,6 +1064,18 @@ private:
CrossThreadWeakPersistent<T> m_value;
};
+template <typename T>
+Persistent<T> wrapPersistent(T* value)
+{
+ return Persistent<T>(value);
+}
+
+template <typename T>
+CrossThreadPersistent<T> wrapCrossThreadPersistent(T* value)
+{
+ return CrossThreadPersistent<T>(value);
+}
+
// LEAK_SANITIZER_DISABLED_SCOPE: all allocations made in the current scope
// will be exempted from LSan consideration.
//
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698