| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e15d22c commit dab15f6
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -566,8 +566,6 @@ would provide the exports interface for the instantiation of `module.wasm`. | |||
| 566 | 566 | added: v14.8.0 | |
| 567 | 567 | --> | |
| 568 | 568 | ||
| 569 | - > Stability: 1 - Experimental | ||
| 570 | - | ||
| 571 | 569 | The `await` keyword may be used in the top level body of an ECMAScript module. | |
| 572 | 570 | ||
| 573 | 571 | Assuming an `a.mjs` with | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -428,13 +428,7 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) { | |||
| 428 | 428 | return; | |
| 429 | 429 | } | |
| 430 | 430 | ||
| 431 | - // If TLA is enabled, `result` is the evaluation's promise. | ||
| 432 | - // Otherwise, `result` is the last evaluated value of the module, | ||
| 433 | - // which could be a promise, which would result in it being incorrectly | ||
| 434 | - // unwrapped when the higher level code awaits the evaluation. | ||
| 435 | - if (env->isolate_data()->options()->experimental_top_level_await) { | ||
| 436 | - args.GetReturnValue().Set(result.ToLocalChecked()); | ||
| 437 | - } | ||
| 431 | + args.GetReturnValue().Set(result.ToLocalChecked()); | ||
| 438 | 432 | } | |
| 439 | 433 | ||
| 440 | 434 | void ModuleWrap::GetNamespace(const FunctionCallbackInfo<Value>& args) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -700,14 +700,8 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( | |||
| 700 | 700 | kAllowedInEnvironment); | |
| 701 | 701 | Implies("--report-signal", "--report-on-signal"); | |
| 702 | 702 | ||
| 703 | - AddOption("--experimental-top-level-await", | ||
| 704 | - "", | ||
| 705 | - &PerIsolateOptions::experimental_top_level_await, | ||
| 706 | - kAllowedInEnvironment); | ||
| 707 | - AddOption("--harmony-top-level-await", "", V8Option{}); | ||
| 708 | - Implies("--experimental-top-level-await", "--harmony-top-level-await"); | ||
| 709 | - Implies("--harmony-top-level-await", "--experimental-top-level-await"); | ||
| 710 | - ImpliesNot("--no-harmony-top-level-await", "--experimental-top-level-await"); | ||
| 703 | + AddOption( | ||
| 704 | + "--experimental-top-level-await", "", NoOp{}, kAllowedInEnvironment); | ||
| 711 | 705 | ||
| 712 | 706 | Insert(eop, &PerIsolateOptions::get_per_env_options); | |
| 713 | 707 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -205,7 +205,6 @@ class PerIsolateOptions : public Options { | |||
| 205 | 205 | bool track_heap_objects = false; | |
| 206 | 206 | bool report_uncaught_exception = false; | |
| 207 | 207 | bool report_on_signal = false; | |
| 208 | - bool experimental_top_level_await = true; | ||
| 209 | 208 | std::string report_signal = "SIGUSR2"; | |
| 210 | 209 | inline EnvironmentOptions* get_per_env_options(); | |
| 211 | 210 | void CheckOptions(std::vector<std::string>* errors) override; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments