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

Unified Diff: tracing/tracing/model/annotation.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/metrics/v8/utils.html ('k') | tracing/tracing/model/async_slice.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/annotation.html
diff --git a/tracing/tracing/model/annotation.html b/tracing/tracing/model/annotation.html
index 1fdc67eb1fa44fad6b3108d75e67aa5e59ca8468..6cdeeb23f22ac57436c072cc60c9840bb89e1ea8 100644
--- a/tracing/tracing/model/annotation.html
+++ b/tracing/tracing/model/annotation.html
@@ -24,15 +24,15 @@ tr.exportTo('tr.model', function() {
}
Annotation.fromDictIfPossible = function(args) {
- if (args.typeName === undefined)
+ if (args.typeName === undefined) {
throw new Error('Missing typeName argument');
+ }
var typeInfo = Annotation.findTypeInfoMatching(function(typeInfo) {
return typeInfo.metadata.typeName === args.typeName;
});
- if (typeInfo === undefined)
- return undefined;
+ if (typeInfo === undefined) return undefined;
return typeInfo.constructor.fromDict(args);
};
@@ -55,8 +55,9 @@ tr.exportTo('tr.model', function() {
},
getOrCreateView: function(viewport) {
- if (!this.view_)
+ if (!this.view_) {
this.view_ = this.createView_(viewport);
+ }
return this.view_;
},
@@ -69,11 +70,13 @@ tr.exportTo('tr.model', function() {
tr.b.decorateExtensionRegistry(Annotation, options);
Annotation.addEventListener('will-register', function(e) {
- if (!e.typeInfo.constructor.hasOwnProperty('fromDict'))
+ if (!e.typeInfo.constructor.hasOwnProperty('fromDict')) {
throw new Error('Must have fromDict method');
+ }
- if (!e.typeInfo.metadata.typeName)
+ if (!e.typeInfo.metadata.typeName) {
throw new Error('Registered Annotations must provide typeName');
+ }
});
return {
« no previous file with comments | « tracing/tracing/metrics/v8/utils.html ('k') | tracing/tracing/model/async_slice.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698