From d5d5971ff1dcaac5ca29f86cd7bfc8274d5d7b40 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sun, 5 Jun 2022 20:01:02 +0900 Subject: [PATCH] Update std.js --- lib/std.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/std.js b/lib/std.js index 952ada3..4213d65 100644 --- a/lib/std.js +++ b/lib/std.js @@ -364,10 +364,9 @@ function StdEventableObject() { }; }; - -function AsyncFunction(f, owner) { +function AsyncFunction(f, _filename) { this.f = f; - this.owner = owner; + this._filename = _filename; this.run = function() { var args = Array.from(arguments); @@ -384,7 +383,7 @@ function AsyncFunction(f, owner) { // CLI or Window? if (typeof WScript !== "undefined") { - require("lib/shell").show(["cscript", "app.js", this.owner, f].concat(args)); + require("lib/shell").show(["cscript", "app.js", this._filename, f].concat(args)); } else { sleep(1, _f); } @@ -394,8 +393,7 @@ function AsyncFunction(f, owner) { return this.f.apply(null, arguments); }; }; - -AsyncFunction.counter = 0; // static variable +AsyncFunction.counter = 0; AsyncFunction.bind = function(exports, args) { var result = false;