@@ -84,6 +84,10 @@ printStackTrace.implementation.prototype = { |
84 | 84 | } |
85 | 85 | // e.stacktrace && e.stack -> opera11 |
86 | 86 | return 'opera11'; // use e.stacktrace, format differs from 'opera10a', 'opera10b' |
| 87 | + } else if (e.stack && !e.fileName) { |
| 88 | + // Chrome 27 does not have e.arguments as earlier versions, |
| 89 | + // but still does not have e.fileName as Firefox |
| 90 | + return 'chrome'; |
87 | 91 | } else if (e.stack) { |
88 | 92 | return 'firefox'; |
89 | 93 | } |
@@ -96,7 +100,7 @@ printStackTrace.implementation.prototype = { |
96 | 100 | * |
97 | 101 | * @param {Object} context of execution (e.g. window) |
98 | 102 | * @param {String} functionName to instrument |
99 | | - * @param {Function} function to call with a stack trace on invocation |
| 103 | + * @param {Function} callback function to call with a stack trace on invocation |
100 | 104 | */ |
101 | 105 | instrumentFunction: function(context, functionName, callback) { |
102 | 106 | context = context || window; |
@@ -264,10 +268,10 @@ printStackTrace.implementation.prototype = { |
264 | 268 | }, |
265 | 269 |
|
266 | 270 | /** |
267 | | - * Given arguments array as a String, subsituting type names for non-string types. |
| 271 | + * Given arguments array as a String, substituting type names for non-string types. |
268 | 272 | * |
269 | | - * @param {Arguments} args |
270 | | - * @return {Array} of Strings with stringified arguments |
| 273 | + * @param {Arguments,Array} args |
| 274 | + * @return {String} stringified arguments |
271 | 275 | */ |
272 | 276 | stringifyArguments: function(args) { |
273 | 277 | var result = []; |
@@ -353,7 +357,7 @@ printStackTrace.implementation.prototype = { |
353 | 357 | * via Ajax). |
354 | 358 | * |
355 | 359 | * @param url <String> source url |
356 | | - * @return False if we need a cross-domain request |
| 360 | + * @return <Boolean> False if we need a cross-domain request |
357 | 361 | */ |
358 | 362 | isSameDomain: function(url) { |
359 | 363 | return typeof location !== "undefined" && url.indexOf(location.hostname) !== -1; // location may not be defined, e.g. when running from nodejs. |
|