Skip to content

Commit 6920e38

Browse files
committed
3.7.0
1 parent cf2ddee commit 6920e38

27 files changed

+51
-214
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.7.0
4+
* BUGFIX: Add missing return types from TypeScript declaration file. See: https://github.com/getsentry/raven-js/pull/718
5+
* BUGFIX: Fix "Permission denied" error in Firefox via WebDriver. See: https://github.com/getsentry/raven-js/pull/720
6+
* REMOVED: Legacy stack trace parsing from Opera 9, 10. See: https://github.com/getsentry/raven-js/pull/716
7+
38
## 3.6.1
49
* BUGFIX: Fix `trimHeadFrames` appearing in some data payloads when using synthetic traces. See: https://github.com/getsentry/raven-js/pull/714
510

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "raven-js",
3-
"version": "3.6.1",
3+
"version": "3.7.0",
44
"dependencies": {},
55
"main": "dist/raven.js",
66
"ignore": [

dist/plugins/angular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/angular.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/console.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/console.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/ember.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/ember.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/require.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/require.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/vue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/vue.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/raven.js

+13-181
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -182,7 +182,7 @@ Raven.prototype = {
182182
// webpack (using a build step causes webpack #1617). Grunt verifies that
183183
// this value matches package.json during build.
184184
// See: https://github.com/getsentry/raven-js/issues/465
185-
VERSION: '3.6.1',
185+
VERSION: '3.7.0',
186186

187187
debug: false,
188188

@@ -351,18 +351,18 @@ Raven.prototype = {
351351
if (func.__raven__) {
352352
return func;
353353
}
354+
355+
// If this has already been wrapped in the past, return that
356+
if (func.__raven_wrapper__ ){
357+
return func.__raven_wrapper__ ;
358+
}
354359
} catch (e) {
355-
// Just accessing the __raven__ prop in some Selenium environments
360+
// Just accessing custom props in some Selenium environments
356361
// can cause a "Permission denied" exception (see raven-js#495).
357362
// Bail on wrapping and return the function as-is (defers to window.onerror).
358363
return func;
359364
}
360365

361-
// If this has already been wrapped in the past, return that
362-
if (func.__raven_wrapper__ ){
363-
return func.__raven_wrapper__ ;
364-
}
365-
366366
function wrapped() {
367367
var args = [], i = arguments.length,
368368
deep = !options || options && options.deep !== false;
@@ -957,7 +957,11 @@ Raven.prototype = {
957957
}, wrappedBuiltIns);
958958
fill(proto, 'removeEventListener', function (orig) {
959959
return function (evt, fn, capture, secure) {
960-
fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
960+
try {
961+
fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
962+
} catch (e) {
963+
// ignore, accessing __raven_wrapper__ will throw in some Selenium environments
964+
}
961965
return orig.call(this, evt, fn, capture, secure);
962966
};
963967
}, wrappedBuiltIns);
@@ -2289,153 +2293,6 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
22892293
};
22902294
}
22912295

2292-
/**
2293-
* Computes stack trace information from the stacktrace property.
2294-
* Opera 10 uses this property.
2295-
* @param {Error} ex
2296-
* @return {?Object.<string, *>} Stack trace information.
2297-
*/
2298-
function computeStackTraceFromStacktraceProp(ex) {
2299-
// Access and store the stacktrace property before doing ANYTHING
2300-
// else to it because Opera is not very good at providing it
2301-
// reliably in other circumstances.
2302-
var stacktrace = ex.stacktrace;
2303-
if (isUndefined(ex.stacktrace) || !ex.stacktrace) return;
2304-
2305-
var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,
2306-
opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,
2307-
lines = stacktrace.split('\n'),
2308-
stack = [],
2309-
parts;
2310-
2311-
for (var line = 0; line < lines.length; line += 2) {
2312-
var element = null;
2313-
if ((parts = opera10Regex.exec(lines[line]))) {
2314-
element = {
2315-
'url': parts[2],
2316-
'line': +parts[1],
2317-
'column': null,
2318-
'func': parts[3],
2319-
'args':[]
2320-
};
2321-
} else if ((parts = opera11Regex.exec(lines[line]))) {
2322-
element = {
2323-
'url': parts[6],
2324-
'line': +parts[1],
2325-
'column': +parts[2],
2326-
'func': parts[3] || parts[4],
2327-
'args': parts[5] ? parts[5].split(',') : []
2328-
};
2329-
}
2330-
2331-
if (element) {
2332-
if (!element.func && element.line) {
2333-
element.func = UNKNOWN_FUNCTION;
2334-
}
2335-
2336-
stack.push(element);
2337-
}
2338-
}
2339-
2340-
if (!stack.length) {
2341-
return null;
2342-
}
2343-
2344-
return {
2345-
'name': ex.name,
2346-
'message': ex.message,
2347-
'url': getLocationHref(),
2348-
'stack': stack
2349-
};
2350-
}
2351-
2352-
/**
2353-
* NOT TESTED.
2354-
* Computes stack trace information from an error message that includes
2355-
* the stack trace.
2356-
* Opera 9 and earlier use this method if the option to show stack
2357-
* traces is turned on in opera:config.
2358-
* @param {Error} ex
2359-
* @return {?Object.<string, *>} Stack information.
2360-
*/
2361-
function computeStackTraceFromOperaMultiLineMessage(ex) {
2362-
// Opera includes a stack trace into the exception message. An example is:
2363-
//
2364-
// Statement on line 3: Undefined variable: undefinedFunc
2365-
// Backtrace:
2366-
// Line 3 of linked script file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.js: In function zzz
2367-
// undefinedFunc(a);
2368-
// Line 7 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function yyy
2369-
// zzz(x, y, z);
2370-
// Line 3 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function xxx
2371-
// yyy(a, a, a);
2372-
// Line 1 of function script
2373-
// try { xxx('hi'); return false; } catch(ex) { TraceKit.report(ex); }
2374-
// ...
2375-
2376-
var lines = ex.message.split('\n');
2377-
if (lines.length < 4) {
2378-
return null;
2379-
}
2380-
2381-
var lineRE1 = /^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,
2382-
lineRE2 = /^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,
2383-
lineRE3 = /^\s*Line (\d+) of function script\s*$/i,
2384-
stack = [],
2385-
scripts = document.getElementsByTagName('script'),
2386-
parts;
2387-
2388-
for (var line = 2; line < lines.length; line += 2) {
2389-
var item = null;
2390-
if ((parts = lineRE1.exec(lines[line]))) {
2391-
item = {
2392-
'url': parts[2],
2393-
'func': parts[3],
2394-
'args': [],
2395-
'line': +parts[1],
2396-
'column': null
2397-
};
2398-
} else if ((parts = lineRE2.exec(lines[line]))) {
2399-
item = {
2400-
'url': parts[3],
2401-
'func': parts[4],
2402-
'args': [],
2403-
'line': +parts[1],
2404-
'column': null // TODO: Check to see if inline#1 (+parts[2]) points to the script number or column number.
2405-
};
2406-
var relativeLine = (+parts[1]); // relative to the start of the <SCRIPT> block
2407-
} else if ((parts = lineRE3.exec(lines[line]))) {
2408-
var url = window.location.href.replace(/#.*$/, '');
2409-
item = {
2410-
'url': url,
2411-
'func': '',
2412-
'args': [],
2413-
'line': parts[1],
2414-
'column': null
2415-
};
2416-
}
2417-
2418-
if (item) {
2419-
if (!item.func) {
2420-
item.func = UNKNOWN_FUNCTION;
2421-
}
2422-
2423-
stack.push(item);
2424-
}
2425-
}
2426-
2427-
if (!stack.length) {
2428-
return null; // could not parse multiline exception message as Opera stack trace
2429-
}
2430-
2431-
return {
2432-
'name': ex.name,
2433-
'message': lines[0],
2434-
'url': getLocationHref(),
2435-
'stack': stack
2436-
};
2437-
}
2438-
24392296
/**
24402297
* Adds information about the first frame to incomplete stack traces.
24412298
* Safari and IE require this to get complete data on the first frame.
@@ -2560,20 +2417,6 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
25602417
var stack = null;
25612418
depth = (depth == null ? 0 : +depth);
25622419

2563-
try {
2564-
// This must be tried first because Opera 10 *destroys*
2565-
// its stacktrace property if you try to access the stack
2566-
// property first!!
2567-
stack = computeStackTraceFromStacktraceProp(ex);
2568-
if (stack) {
2569-
return stack;
2570-
}
2571-
} catch (e) {
2572-
if (TraceKit.debug) {
2573-
throw e;
2574-
}
2575-
}
2576-
25772420
try {
25782421
stack = computeStackTraceFromStackProp(ex);
25792422
if (stack) {
@@ -2585,17 +2428,6 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
25852428
}
25862429
}
25872430

2588-
try {
2589-
stack = computeStackTraceFromOperaMultiLineMessage(ex);
2590-
if (stack) {
2591-
return stack;
2592-
}
2593-
} catch (e) {
2594-
if (TraceKit.debug) {
2595-
throw e;
2596-
}
2597-
}
2598-
25992431
try {
26002432
stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
26012433
if (stack) {

dist/raven.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/raven.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sri.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"@dist/raven.js": {
33
"hashes": {
4-
"sha256": "gYS09eseknpRK6X4Kue9Y61yaxLkDrQRbYz9Fx06pYI=",
5-
"sha512": "vio21BavZ9HqTZ3/ip3C5B5kSprPF092jh8lOMWP9l5kAuUKkgaStFad6DE8IXF2JwVKjjLFNumQG5l8bGcztA=="
4+
"sha256": "ecZRD/BsOVlzLCDJwinYdV6NWcOnmWHN0Uw7cWnFJ2k=",
5+
"sha512": "Yf6vesrTj/GDukFf+vrtsRHNgTrjgvdHaZKS3mr+J2XKTsrHdqVor7cRd8Jao2hx5RzQaE2V8kQK41Y0w3bWtQ=="
66
},
77
"type": null,
8-
"integrity": "sha256-gYS09eseknpRK6X4Kue9Y61yaxLkDrQRbYz9Fx06pYI= sha512-vio21BavZ9HqTZ3/ip3C5B5kSprPF092jh8lOMWP9l5kAuUKkgaStFad6DE8IXF2JwVKjjLFNumQG5l8bGcztA==",
8+
"integrity": "sha256-ecZRD/BsOVlzLCDJwinYdV6NWcOnmWHN0Uw7cWnFJ2k= sha512-Yf6vesrTj/GDukFf+vrtsRHNgTrjgvdHaZKS3mr+J2XKTsrHdqVor7cRd8Jao2hx5RzQaE2V8kQK41Y0w3bWtQ==",
99
"path": "dist/raven.js"
1010
},
1111
"@dist/raven.min.js": {
1212
"hashes": {
13-
"sha256": "QP4ST/YcNDgM1Z7cHpcC6Jkd6mRqkOFIyXrDjYF025k=",
14-
"sha512": "mef0s0xPrUB28Rf1WmjIfWeBD2E5Mwwhyg+nDQnhmG7Vd8Yp9z3TUN9Zie0scaFAYYinVNrnhZSPSil9OysE/A=="
13+
"sha256": "VmYZPllL21g2wCZj3YU5Yi9fjyITrkuFZgEMM+qeyLY=",
14+
"sha512": "wtDbnF+apf6MpUPOc0D1wP+gbAZb3inbQU3wmhd+eTbND1jI989Akpj84yZRvfJb/Hq2nRhZJif2M6QGQfkBJw=="
1515
},
1616
"type": null,
17-
"integrity": "sha256-QP4ST/YcNDgM1Z7cHpcC6Jkd6mRqkOFIyXrDjYF025k= sha512-mef0s0xPrUB28Rf1WmjIfWeBD2E5Mwwhyg+nDQnhmG7Vd8Yp9z3TUN9Zie0scaFAYYinVNrnhZSPSil9OysE/A==",
17+
"integrity": "sha256-VmYZPllL21g2wCZj3YU5Yi9fjyITrkuFZgEMM+qeyLY= sha512-wtDbnF+apf6MpUPOc0D1wP+gbAZb3inbQU3wmhd+eTbND1jI989Akpj84yZRvfJb/Hq2nRhZJif2M6QGQfkBJw==",
1818
"path": "dist/raven.min.js"
1919
}
2020
}

docs/config.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Putting it all together
269269
<body>
270270
...
271271
<script src="jquery.min.js"></script>
272-
<script src="https://cdn.ravenjs.com/3.6.1/raven.min.js"></script>
272+
<script src="https://cdn.ravenjs.com/3.7.0/raven.min.js"></script>
273273
<script>
274274
Raven.config('___PUBLIC_DSN___', {
275275
logger: 'my-logger',

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ scripts. For all details see :doc:`install`.
2626

2727
.. sourcecode:: html
2828

29-
<script src="https://cdn.ravenjs.com/3.6.1/raven.min.js"></script>
29+
<script src="https://cdn.ravenjs.com/3.7.0/raven.min.js"></script>
3030

3131

3232
Configuring the Client

0 commit comments

Comments
 (0)