| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/model/object_instance.html"> | 8 <link rel="import" href="/tracing/model/object_instance.html"> |
| 9 | 9 |
| 10 <script> | 10 <script> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 ObjectSnapshot.apply(this, arguments); | 34 ObjectSnapshot.apply(this, arguments); |
| 35 } | 35 } |
| 36 | 36 |
| 37 BlameContextSnapshot.prototype = { | 37 BlameContextSnapshot.prototype = { |
| 38 __proto__: ObjectSnapshot.prototype, | 38 __proto__: ObjectSnapshot.prototype, |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * Returns the parent in the context tree. | 41 * Returns the parent in the context tree. |
| 42 */ | 42 */ |
| 43 get parentContext() { | 43 get parentContext() { |
| 44 if (this.args.parent instanceof BlameContextSnapshot) | 44 if (this.args.parent instanceof BlameContextSnapshot) { |
| 45 return this.args.parent; | 45 return this.args.parent; |
| 46 } |
| 46 return undefined; | 47 return undefined; |
| 47 }, | 48 }, |
| 48 | 49 |
| 49 get userFriendlyName() { | 50 get userFriendlyName() { |
| 50 return 'BlameContext'; | 51 return 'BlameContext'; |
| 51 } | 52 } |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 function BlameContextInstance() { | 55 function BlameContextInstance() { |
| 55 ObjectInstance.apply(this, arguments); | 56 ObjectInstance.apply(this, arguments); |
| 56 } | 57 } |
| 57 | 58 |
| 58 BlameContextInstance.prototype = { | 59 BlameContextInstance.prototype = { |
| 59 __proto__: ObjectInstance.prototype, | 60 __proto__: ObjectInstance.prototype, |
| 60 | 61 |
| 61 /** | 62 /** |
| 62 * Returns the type of the blame context, to be overriden by subclasses. | 63 * Returns the type of the blame context, to be overriden by subclasses. |
| 63 */ | 64 */ |
| 64 get blameContextType() { | 65 get blameContextType() { |
| 65 throw new Error('Not implemented'); | 66 throw new Error('Not implemented'); |
| 66 } | 67 } |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 return { | 70 return { |
| 70 BlameContextSnapshot, | 71 BlameContextSnapshot, |
| 71 BlameContextInstance, | 72 BlameContextInstance, |
| 72 }; | 73 }; |
| 73 }); | 74 }); |
| 74 </script> | 75 </script> |
| OLD | NEW |