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

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

Issue 475803002: Make profiling lock global rather than per Target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Extracted Lock.js Created 6 years, 4 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/Object.js
diff --git a/Source/devtools/front_end/common/Object.js b/Source/devtools/front_end/common/Object.js
index 2026873829793ebcbfdfd79ba8ef2ccaa858e9e1..8528e8e682b852437007a979140868e4137c69a4 100644
--- a/Source/devtools/front_end/common/Object.js
+++ b/Source/devtools/front_end/common/Object.js
@@ -145,51 +145,6 @@ WebInspector.Event.prototype = {
}
/**
- * @constructor
- * @extends {WebInspector.Object}
- */
-WebInspector.Lock = function()
-{
- this._count = 0; // Reentrant.
-}
-
-/**
- * @enum {string}
- */
-WebInspector.Lock.Events = {
- StateChanged: "StateChanged"
-}
-
-WebInspector.Lock.prototype = {
- /**
- * @return {boolean}
- */
- isAcquired: function()
- {
- return !!this._count;
- },
-
- acquire: function()
- {
- if (++this._count === 1)
- this.dispatchEventToListeners(WebInspector.Lock.Events.StateChanged);
- },
-
- release: function()
- {
- --this._count;
- if (this._count < 0) {
- console.error("WebInspector.Lock acquire/release calls are unbalanced " + new Error().stack);
- return;
- }
- if (!this._count)
- this.dispatchEventToListeners(WebInspector.Lock.Events.StateChanged);
- },
-
- __proto__: WebInspector.Object.prototype
-}
-
-/**
* @interface
*/
WebInspector.EventTarget = function()

Powered by Google App Engine
This is Rietveld 408576698