Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-inline-script-content): Swallow errors from selenium #605

Merged
merged 1 commit into from
Aug 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ module.exports = {
// this is required for removeEventListener to remove anything added with
// addEventListener before the functions started being wrapped by Bugsnag
const args = Array.prototype.slice.call(arguments)
const cba = callbackAccessor(args)
const cb = cba.get()
if (alsoCallOriginal) fn.apply(this, args)
if (typeof cb !== 'function') return fn.apply(this, args)
try {
const cba = callbackAccessor(args)
const cb = cba.get()
if (alsoCallOriginal) fn.apply(this, args)
if (typeof cb !== 'function') return fn.apply(this, args)
if (cb.__trace__) {
cba.replace(cb.__trace__)
} else {
Expand All @@ -145,6 +145,7 @@ module.exports = {
} catch (e) {
// swallow these errors on Selenium:
// Permission denied to access property '__trace__'
// WebDriverException: Message: Permission denied to access property "handleEvent"
}
// IE8 doesn't let you call .apply() on setTimeout/setInterval
if (fn.apply) return fn.apply(this, args)
Expand Down