OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 * @param {string} prefix | 1130 * @param {string} prefix |
1131 */ | 1131 */ |
1132 function startsWith(prefix) { | 1132 function startsWith(prefix) { |
1133 return string.startsWith(prefix); | 1133 return string.startsWith(prefix); |
1134 } | 1134 } |
1135 | 1135 |
1136 var errorPrefixes = ['EvalError', 'ReferenceError', 'SyntaxError', 'TypeErro
r', 'RangeError', 'Error', 'URIError']; | 1136 var errorPrefixes = ['EvalError', 'ReferenceError', 'SyntaxError', 'TypeErro
r', 'RangeError', 'Error', 'URIError']; |
1137 var target = this._target(); | 1137 var target = this._target(); |
1138 if (!target || !errorPrefixes.some(startsWith)) | 1138 if (!target || !errorPrefixes.some(startsWith)) |
1139 return null; | 1139 return null; |
1140 var debuggerModel = SDK.DebuggerModel.fromTarget(target); | 1140 var debuggerModel = target.model(SDK.DebuggerModel); |
1141 if (!debuggerModel) | 1141 if (!debuggerModel) |
1142 return null; | 1142 return null; |
1143 | 1143 |
1144 var lines = string.split('\n'); | 1144 var lines = string.split('\n'); |
1145 var links = []; | 1145 var links = []; |
1146 var position = 0; | 1146 var position = 0; |
1147 for (var i = 0; i < lines.length; ++i) { | 1147 for (var i = 0; i < lines.length; ++i) { |
1148 position += i > 0 ? lines[i - 1].length + 1 : 0; | 1148 position += i > 0 ? lines[i - 1].length + 1 : 0; |
1149 var isCallFrameLine = /^\s*at\s/.test(lines[i]); | 1149 var isCallFrameLine = /^\s*at\s/.test(lines[i]); |
1150 if (!isCallFrameLine && links.length) | 1150 if (!isCallFrameLine && links.length) |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 toMessageElement() { | 1247 toMessageElement() { |
1248 if (!this._element) { | 1248 if (!this._element) { |
1249 super.toMessageElement(); | 1249 super.toMessageElement(); |
1250 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); | 1250 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); |
1251 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); | 1251 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); |
1252 this.setCollapsed(this._collapsed); | 1252 this.setCollapsed(this._collapsed); |
1253 } | 1253 } |
1254 return this._element; | 1254 return this._element; |
1255 } | 1255 } |
1256 }; | 1256 }; |
OLD | NEW |