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

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

Issue 673163004: [DevTools] Extract platform module. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bug in hosted mode Created 6 years, 1 month 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 | « Source/devtools/front_end/platform/module.json ('k') | Source/devtools/front_end/promises/module.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/platform/utilities.js
diff --git a/Source/devtools/front_end/common/utilities.js b/Source/devtools/front_end/platform/utilities.js
similarity index 98%
rename from Source/devtools/front_end/common/utilities.js
rename to Source/devtools/front_end/platform/utilities.js
index 3f62618eda1d245da3a2ba8e41bb28d0127face4..7c9301cf5abe8388163e879d5cef35f521994f35 100644
--- a/Source/devtools/front_end/common/utilities.js
+++ b/Source/devtools/front_end/platform/utilities.js
@@ -27,6 +27,17 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// FIXME: This performance optimization should be moved to blink so that all developers could enjoy it.
+// console is retrieved with V8Window.getAttribute method which is slow. Here we copy it to a js variable for faster access.
+console = console;
+console.__originalAssert = console.assert;
+console.assert = function(value, message)
+{
+ if (value)
+ return;
+ console.__originalAssert(value, message);
+}
+
/** @typedef {Array|NodeList|Arguments|{length: number}} */
var ArrayLike;
« no previous file with comments | « Source/devtools/front_end/platform/module.json ('k') | Source/devtools/front_end/promises/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698