| 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);
|
| },
|
|
|
|
|