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

Unified Diff: tracing/tracing/base/timing.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « tracing/tracing/base/task_test.html ('k') | tracing/tracing/base/timing_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/timing.html
diff --git a/tracing/tracing/base/timing.html b/tracing/tracing/base/timing.html
index b2042325c64d1e4112f0623693a6fa6221ffd5dd..aef50d4d23efc4b6423198494069f5b837118be4 100644
--- a/tracing/tracing/base/timing.html
+++ b/tracing/tracing/base/timing.html
@@ -15,10 +15,12 @@ tr.exportTo('tr.b', function() {
var Base64 = tr.b.Base64;
function computeUserTimingMarkName(groupName, functionName, opt_args) {
- if (groupName === undefined)
+ if (groupName === undefined) {
throw new Error('getMeasureString should have group name');
- if (functionName === undefined)
+ }
+ if (functionName === undefined) {
throw new Error('getMeasureString should have function name');
+ }
var userTimingMarkName = groupName + ':' + functionName;
if (opt_args !== undefined) {
userTimingMarkName += '/';
@@ -54,10 +56,12 @@ tr.exportTo('tr.b', function() {
};
Timing.wrap = function(groupName, callback, opt_args) {
- if (groupName === undefined)
+ if (groupName === undefined) {
throw new Error('Timing.wrap should have group name');
- if (callback.name === '')
+ }
+ if (callback.name === '') {
throw new Error('Anonymous function is not allowed');
+ }
return Timing.wrapNamedFunction(
groupName, callback.name, callback, opt_args);
};
« no previous file with comments | « tracing/tracing/base/task_test.html ('k') | tracing/tracing/base/timing_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698