GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixes #51 - exception does not have `arguments` property in Chrome 27 · dolfly/javascript-stacktrace@42f6621

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • stacktrace.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎stacktrace.js‎

Copy file name to clipboardExpand all lines: stacktrace.js
+9-5Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ printStackTrace.implementation.prototype = {
8484
}
8585
// e.stacktrace && e.stack -> opera11
8686
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';
8791
} else if (e.stack) {
8892
return 'firefox';
8993
}
@@ -96,7 +100,7 @@ printStackTrace.implementation.prototype = {
96100
*
97101
* @param {Object} context of execution (e.g. window)
98102
* @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
100104
*/
101105
instrumentFunction: function(context, functionName, callback) {
102106
context = context || window;
@@ -264,10 +268,10 @@ printStackTrace.implementation.prototype = {
264268
},
265269

266270
/**
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.
268272
*
269-
* @param {Arguments} args
270-
* @return {Array} of Strings with stringified arguments
273+
* @param {Arguments,Array} args
274+
* @return {String} stringified arguments
271275
*/
272276
stringifyArguments: function(args) {
273277
var result = [];
@@ -353,7 +357,7 @@ printStackTrace.implementation.prototype = {
353357
* via Ajax).
354358
*
355359
* @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
357361
*/
358362
isSameDomain: function(url) {
359363
return typeof location !== "undefined" && url.indexOf(location.hostname) !== -1; // location may not be defined, e.g. when running from nodejs.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.