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

Unified Diff: tracing/third_party/tvcm/tvcm/js_utils.py

Issue 1376953005: Move tracing/third_party/tvcm -> third_party/py_vulcanize. (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Created 5 years, 2 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: tracing/third_party/tvcm/tvcm/js_utils.py
diff --git a/tracing/third_party/tvcm/tvcm/js_utils.py b/tracing/third_party/tvcm/tvcm/js_utils.py
deleted file mode 100644
index 43d85e69ee2555c2297f612c486d7a5992ec3ee1..0000000000000000000000000000000000000000
--- a/tracing/third_party/tvcm/tvcm/js_utils.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-def EscapeJSIfNeeded(js):
- return js.replace('</script>', '<\/script>')
-
-
-def ValidateUsesStrictMode(module_name, stripped_text):
- """Check that the first non-empty line is 'use strict';.
-
- Args:
- stripped_text: JavaScript source code with comments stripped out.
-
- Raises:
- DepsException: This file doesn't use strict mode.
- """
- lines = stripped_text.split('\n')
- for line in lines:
- line = line.strip()
- if len(line.strip()) == 0:
- continue
- if """'use strict';""" in line.strip():
- break
- # FIXME: module is used but not imported. But, importing tvcm.module
- # leads to an import cycle since tvcm.module imports js_utils.
- raise module.DepsException('%s must use strict mode' % module_name)

Powered by Google App Engine
This is Rietveld 408576698