| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e78bcb7 commit c7fb9cb
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -556,8 +556,6 @@ would provide the exports interface for the instantiation of `module.wasm`. | |||
| 556 | 556 | added: v14.8.0 | |
| 557 | 557 | --> | |
| 558 | 558 | ||
| 559 | - > Stability: 1 - Experimental | ||
| 560 | - | ||
| 561 | 559 | The `await` keyword may be used in the top level body of an ECMAScript module. | |
| 562 | 560 | ||
| 563 | 561 | Assuming an `a.mjs` with | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -429,13 +429,7 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) { | |||
| 429 | 429 | return; | |
| 430 | 430 | } | |
| 431 | 431 | ||
| 432 | - // If TLA is enabled, `result` is the evaluation's promise. | ||
| 433 | - // Otherwise, `result` is the last evaluated value of the module, | ||
| 434 | - // which could be a promise, which would result in it being incorrectly | ||
| 435 | - // unwrapped when the higher level code awaits the evaluation. | ||
| 436 | - if (env->isolate_data()->options()->experimental_top_level_await) { | ||
| 437 | - args.GetReturnValue().Set(result.ToLocalChecked()); | ||
| 438 | - } | ||
| 432 | + args.GetReturnValue().Set(result.ToLocalChecked()); | ||
| 439 | 433 | } | |
| 440 | 434 | ||
| 441 | 435 | void ModuleWrap::GetNamespace(const FunctionCallbackInfo<Value>& args) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -670,14 +670,8 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( | |||
| 670 | 670 | kAllowedInEnvironment); | |
| 671 | 671 | Implies("--report-signal", "--report-on-signal"); | |
| 672 | 672 | ||
| 673 | - AddOption("--experimental-top-level-await", | ||
| 674 | - "", | ||
| 675 | - &PerIsolateOptions::experimental_top_level_await, | ||
| 676 | - kAllowedInEnvironment); | ||
| 677 | - AddOption("--harmony-top-level-await", "", V8Option{}); | ||
| 678 | - Implies("--experimental-top-level-await", "--harmony-top-level-await"); | ||
| 679 | - Implies("--harmony-top-level-await", "--experimental-top-level-await"); | ||
| 680 | - ImpliesNot("--no-harmony-top-level-await", "--experimental-top-level-await"); | ||
| 673 | + AddOption( | ||
| 674 | + "--experimental-top-level-await", "", NoOp{}, kAllowedInEnvironment); | ||
| 681 | 675 | ||
| 682 | 676 | Insert(eop, &PerIsolateOptions::get_per_env_options); | |
| 683 | 677 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -199,7 +199,6 @@ class PerIsolateOptions : public Options { | |||
| 199 | 199 | bool node_snapshot = true; | |
| 200 | 200 | bool report_uncaught_exception = false; | |
| 201 | 201 | bool report_on_signal = false; | |
| 202 | - bool experimental_top_level_await = true; | ||
| 203 | 202 | std::string report_signal = "SIGUSR2"; | |
| 204 | 203 | inline EnvironmentOptions* get_per_env_options(); | |
| 205 | 204 | void CheckOptions(std::vector<std::string>* errors) override; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments