Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: polyfill.js

Issue 29995563: Noissue - Remove unnecessary stack trace (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Feb. 2, 2019, 4:05 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: polyfill.js
===================================================================
--- a/polyfill.js
+++ b/polyfill.js
@@ -101,33 +101,26 @@
// callback to the list, it won't match the signature of the function
// and will cause an exception.
if (typeof args[args.length - 1] == "undefined")
args.pop();
let resolvePromise = null;
let rejectPromise = null;
- let callStack = new Error().stack;
-
func.call(object, ...args, result =>
{
let error = browser.runtime.lastError;
if (error && !portClosedBeforeResponseError.test(error.message))
{
// runtime.lastError is already an Error instance on Edge, while on
// Chrome it is a plain object with only a message property.
if (!(error instanceof Error))
- {
error = new Error(error.message);
- // Add a more helpful stack trace.
- error.stack = callStack;
- }
-
rejectPromise(error);
}
else
{
resolvePromise(result);
}
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld