Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1526 from zombie/1026187-proto-warning
Browse files Browse the repository at this point in the history
Bug 1026187 - avoid setting __proto__ r=@ZER0
  • Loading branch information
erikvold committed Jul 15, 2014
2 parents cf8176f + 68351d7 commit 9588547
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/sdk/test/harness.js
Expand Up @@ -18,6 +18,7 @@ const system = require("../system");
const memory = require('../deprecated/memory');
const { gc: gcPromise } = require('./memory');
const { defer } = require('../core/promise');
const { extend } = require('../core/heritage');

// Trick manifest builder to make it think we need these modules ?
const unit = require("../deprecated/unit-test");
Expand Down Expand Up @@ -453,7 +454,7 @@ var consoleListener = {
};

function TestRunnerConsole(base, options) {
this.__proto__ = {
let proto = extend(base, {
errorsLogged: 0,
warn: function warn() {
this.errorsLogged++;
Expand All @@ -470,8 +471,8 @@ function TestRunnerConsole(base, options) {
if (first == "pass:")
print(".");
},
__proto__: base
};
});
return Object.create(proto);
}

function stringify(arg) {
Expand Down

0 comments on commit 9588547

Please sign in to comment.