mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Fix memory leak in error. Fixes #2025
This commit is contained in:
@@ -2,6 +2,8 @@ var utils = require("./utils.js");
|
||||
|
||||
var LessError = module.exports = function LessError(e, importManager, currentFilename) {
|
||||
|
||||
Error.call(this);
|
||||
|
||||
var filename = e.filename || currentFilename;
|
||||
|
||||
if (importManager && filename) {
|
||||
@@ -29,5 +31,5 @@ var LessError = module.exports = function LessError(e, importManager, currentFil
|
||||
this.stack = e.stack;
|
||||
};
|
||||
|
||||
LessError.prototype = new Error();
|
||||
LessError.prototype = Object.create(Error.prototype);
|
||||
LessError.prototype.constructor = LessError;
|
||||
|
||||
Reference in New Issue
Block a user