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

Unified Diff: tracing/tracing/model/event_registry.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/model/event_container.html ('k') | tracing/tracing/model/event_set.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/event_registry.html
diff --git a/tracing/tracing/model/event_registry.html b/tracing/tracing/model/event_registry.html
index bace88de9c961a7b0c96d5c0636e762424fa5579..4215c26a866da7ffaa18bddb037dedb3fa75092b 100644
--- a/tracing/tracing/model/event_registry.html
+++ b/tracing/tracing/model/event_registry.html
@@ -24,10 +24,12 @@ tr.exportTo('tr.model', function() {
// Enforce all options objects have the right fields.
EventRegistry.addEventListener('will-register', function(e) {
var metadata = e.typeInfo.metadata;
- if (metadata.name === undefined)
+ if (metadata.name === undefined) {
throw new Error('Registered events must provide name metadata');
- if (metadata.pluralName === undefined)
+ }
+ if (metadata.pluralName === undefined) {
throw new Error('Registered events must provide pluralName metadata');
+ }
// Add a subtype registry to every event so that all events can be
// extended
@@ -39,8 +41,9 @@ tr.exportTo('tr.model', function() {
options.defaultConstructor = e.typeInfo.constructor;
tr.b.decorateExtensionRegistry(metadata.subTypes, options);
} else {
- if (!metadata.subTypes.register)
+ if (!metadata.subTypes.register) {
throw new Error('metadata.subTypes must be an extension registry.');
+ }
}
e.typeInfo.constructor.subTypes = metadata.subTypes;
« no previous file with comments | « tracing/tracing/model/event_container.html ('k') | tracing/tracing/model/event_set.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698