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

Unified Diff: third_party/WebKit/Source/platform/bindings/ScopedPersistent.h

Issue 2851563004: Add documentation for platform/bindings (Closed)
Patch Set: Address code review Created 3 years, 8 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
Index: third_party/WebKit/Source/platform/bindings/ScopedPersistent.h
diff --git a/third_party/WebKit/Source/platform/bindings/ScopedPersistent.h b/third_party/WebKit/Source/platform/bindings/ScopedPersistent.h
index 2cf5ae2a90504f486215c7519d55a4903841680e..11e12a0e80cd09bc836a75f9489fccef745f331f 100644
--- a/third_party/WebKit/Source/platform/bindings/ScopedPersistent.h
+++ b/third_party/WebKit/Source/platform/bindings/ScopedPersistent.h
@@ -40,6 +40,10 @@
namespace blink {
+// Holds a persistent handle to a V8 object; use ScopedPersistent instead of
+// directly using v8::Persistent. Introducing a (non-weak) ScopedPersistent
+// has a risk of producing memory leaks, ask blink-reviews-bindings@ for a
+// review.
template <typename T>
class ScopedPersistent {
USING_FAST_MALLOC(ScopedPersistent);
« no previous file with comments | « third_party/WebKit/Source/platform/bindings/README.md ('k') | third_party/WebKit/Source/platform/bindings/ScriptWrappable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698