8000 core, refactor: remove support for top-level async in common modules. · fibjs/fibjs@65134ae · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 65134ae

Browse files
committed
core, refactor: remove support for top-level async in common modules.
1 parent cb8336d commit 65134ae

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

fibjs/src/sandbox/loaders/base_loader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
namespace fibjs {
1616

17-
const char* SandBox::worker_args = "(async function(exports,require,module,__filename,__dirname,run,Master){";
18-
const char* SandBox::module_args = "(async function(exports,require,module,__filename,__dirname,run){";
19-
const char* SandBox::base_args = "(async function(exports,require,module,__filename,__dirname,run";
17+
const char* SandBox::worker_args = "(function(exports,require,module,__filename,__dirname,run,Master){";
18+
const char* SandBox::module_args = "(function(exports,require,module,__filename,__dirname,run){";
19+
const char* SandBox::base_args = "(function(exports,require,module,__filename,__dirname,run";
2020

2121
result_t SandBox::ExtLoader::run_script(Context* ctx, Buffer_base* src, exlib::string name,
2222
std::vector<arg>& extarg, bool is_main)

test/module_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe("module", () => {
101101
});
102102
});
103103

104-
it("require async file", () => {
104+
xit("require async file", () => {
105105
assert.equal(require('./module/d2'), 100);
106106
});
107107

test/promise_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('promise', () => {
4242
t('promise5.js', '');
4343
});
4444

45-
it("error in async function", () => {
45+
xit("error in async function", () => {
4646
t('async1.js', '/promise/async1.js:2:11\n throw new Error(100);\n ^\nError: 100\n at t (/promise/async1.js:2:11)\n at /promise/async1.js:5:7\n');
4747
});
4848

0 commit comments

Comments
 (0)
0