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

Unified Diff: tracing/tracing/model/stack_frame.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/source_info/source_info.html ('k') | tracing/tracing/model/thread.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/stack_frame.html
diff --git a/tracing/tracing/model/stack_frame.html b/tracing/tracing/model/stack_frame.html
index 67b378577edfb127372a5e542387989d3ccc9a35..a9cf23c089fb4d97cbded3ab1ec3d21d7f644462 100644
--- a/tracing/tracing/model/stack_frame.html
+++ b/tracing/tracing/model/stack_frame.html
@@ -10,8 +10,9 @@ found in the LICENSE file.
tr.exportTo('tr.model', function() {
function StackFrame(parentFrame, id, title, colorId, opt_sourceInfo) {
- if (id === undefined)
+ if (id === undefined) {
throw new Error('id must be given');
+ }
this.parentFrame_ = parentFrame;
this.id = id;
this.title_ = title;
@@ -19,8 +20,9 @@ tr.exportTo('tr.model', function() {
this.children = [];
this.sourceInfo_ = opt_sourceInfo;
- if (this.parentFrame_)
+ if (this.parentFrame_) {
this.parentFrame_.addChild(this);
+ }
}
StackFrame.prototype = {
@@ -42,10 +44,12 @@ tr.exportTo('tr.model', function() {
*/
get domain() {
var result = 'unknown';
- if (this.sourceInfo_ && this.sourceInfo_.domain)
+ if (this.sourceInfo_ && this.sourceInfo_.domain) {
result = this.sourceInfo_.domain;
- if (result === 'unknown' && this.parentFrame)
+ }
+ if (result === 'unknown' && this.parentFrame) {
result = this.parentFrame.domain;
+ }
return result;
},
@@ -54,11 +58,13 @@ tr.exportTo('tr.model', function() {
},
set parentFrame(parentFrame) {
- if (this.parentFrame_)
+ if (this.parentFrame_) {
Polymer.dom(this.parentFrame_).removeChild(this);
+ }
this.parentFrame_ = parentFrame;
- if (this.parentFrame_)
+ if (this.parentFrame_) {
this.parentFrame_.addChild(this);
+ }
},
addChild: function(child) {
@@ -67,14 +73,16 @@ tr.exportTo('tr.model', function() {
removeChild: function(child) {
var i = this.children.indexOf(child.id);
- if (i === -1)
+ if (i === -1) {
throw new Error('omg');
+ }
this.children.splice(i, 1);
},
removeAllChildren: function() {
- for (var i = 0; i < this.children.length; i++)
+ for (var i = 0; i < this.children.length; i++) {
this.children[i].parentFrame_ = undefined;
+ }
this.children.splice(0, this.children.length);
},
« no previous file with comments | « tracing/tracing/model/source_info/source_info.html ('k') | tracing/tracing/model/thread.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698