|
14 | 14 |
|
15 | 15 | namespace fibjs {
|
16 | 16 |
|
17 |
| -const char* SandBox::script_args = "(async function(__filename,__dirname,require,run,exports,module,__argv){"; |
18 |
| -const char* SandBox::worker_args = "(async function(__filename,__dirname,require,run,exports,module,Master){"; |
19 |
| -const char* SandBox::module_args = "(async function(__filename,__dirname,require,run,exports,module){"; |
20 |
| -const char* SandBox::base_args = "(async function(__filename,__dirname,require,run,exports,module"; |
| 17 | +const char* SandBox::script_args = "(async function(exports,require,module,__filename,__dirname,run,__argv){"; |
| 18 | +const char* SandBox::worker_args = "(async function(exports,require,module,__filename,__dirname,run,Master){"; |
| 19 | +const char* SandBox::module_args = "(async function(exports,require,module,__filename,__dirname,run){"; |
| 20 | +const char* SandBox::base_args = "(async function(exports,require,module,__filename,__dirname,run"; |
21 | 21 |
|
22 | 22 | result_t SandBox::ExtLoader::run_script(Context* ctx, Buffer_base* src, exlib::string name,
|
23 | 23 | std::vector<arg>& extarg, bool is_main)
|
@@ -52,12 +52,12 @@ result_t SandBox::ExtLoader::run_module(Context* ctx, Buffer_base* src, exlib::s
|
52 | 52 | exlib::string pname;
|
53 | 53 | path_base::dirname(name, pname);
|
54 | 54 |
|
55 |
| - args[0] = isolate->NewString(name); |
56 |
| - args[1] = isolate->NewString(pname); |
57 |
| - args[2] = ctx->m_fnRequest; |
58 |
| - args[3] = ctx->m_fnRun; |
59 |
| - args[4] = exports; |
60 |
| - args[5] = module; |
| 55 | + args[0] = exports; |
| 56 | + args[1] = ctx->m_fnRequest; |
| 57 | + args[2] = module; |
| 58 | + args[3] = isolate->NewString(name); |
| 59 | + args[4] = isolate->NewString(pname); |
| 60 | + args[5] = ctx->m_fnRun; |
61 | 61 |
|
62 | 62 | int32_t i;
|
63 | 63 | exlib::string arg_names(base_args);
|
|
0 commit comments