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

Unified Diff: Source/devtools/front_end/common/utilities.js

Issue 389563002: DevTools: make paint profiler target-aware (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed a test and a stray line Created 6 years, 5 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: Source/devtools/front_end/common/utilities.js
diff --git a/Source/devtools/front_end/common/utilities.js b/Source/devtools/front_end/common/utilities.js
index d38d236f832f5f32fda2a4a05fda22efaac753de..32d56cc2b87e085fd4e98071d1d20e6ac4c1adeb 100644
--- a/Source/devtools/front_end/common/utilities.js
+++ b/Source/devtools/front_end/common/utilities.js
@@ -1777,3 +1777,29 @@ CallbackBarrier.prototype = {
function suppressUnused(value)
{
}
+
+/**
+ * @constructor
+ * @param {!T} targetObject
+ * @template T
+ */
+function WeakReference(targetObject)
+{
+ this._targetObject = targetObject;
+}
+
+WeakReference.prototype = {
+ /**
+ * @return {?T}
+ */
+ get: function()
+ {
+ return this._targetObject;
+ },
+
+ clear: function()
+ {
+ this._targetObject = null;
+ }
+};
+

Powered by Google App Engine
This is Rietveld 408576698