diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:39:11 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:46:25 +0100 |
commit | 6ca81ad72a3c6fdf16c683335be748f22aaa9a0d (patch) | |
tree | 33c8ee75f729aed76c2c0b89c63f9bf1b4dd66aa /deps/v8/src/objects/synthetic-module.cc | |
parent | 1eee0b8bf8bba39b600fb16a9223e545e3bac2bc (diff) | |
download | node-new-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.gz |
deps: update V8 to 7.9.317.20
PR-URL: https://github.com/nodejs/node/pull/30020
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/synthetic-module.cc')
-rw-r--r-- | deps/v8/src/objects/synthetic-module.cc | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/deps/v8/src/objects/synthetic-module.cc b/deps/v8/src/objects/synthetic-module.cc index 850721ac99..58e0c1b58c 100644 --- a/deps/v8/src/objects/synthetic-module.cc +++ b/deps/v8/src/objects/synthetic-module.cc @@ -17,36 +17,16 @@ namespace internal { // Implements SetSyntheticModuleBinding: // https://heycam.github.io/webidl/#setsyntheticmoduleexport -Maybe<bool> SyntheticModule::SetExport(Isolate* isolate, - Handle<SyntheticModule> module, - Handle<String> export_name, - Handle<Object> export_value) { +void SyntheticModule::SetExport(Isolate* isolate, + Handle<SyntheticModule> module, + Handle<String> export_name, + Handle<Object> export_value) { Handle<ObjectHashTable> exports(module->exports(), isolate); Handle<Object> export_object(exports->Lookup(export_name), isolate); - - if (!export_object->IsCell()) { - isolate->Throw(*isolate->factory()->NewReferenceError( - MessageTemplate::kModuleExportUndefined, export_name)); - return Nothing<bool>(); - } - + CHECK(export_object->IsCell()); Handle<Cell> export_cell(Handle<Cell>::cast(export_object)); // Spec step 2: Set the mutable binding of export_name to export_value export_cell->set_value(*export_value); - - return Just(true); -} - -void SyntheticModule::SetExportStrict(Isolate* isolate, - Handle<SyntheticModule> module, - Handle<String> export_name, - Handle<Object> export_value) { - Handle<ObjectHashTable> exports(module->exports(), isolate); - Handle<Object> export_object(exports->Lookup(export_name), isolate); - CHECK(export_object->IsCell()); - Maybe<bool> set_export_result = - SetExport(isolate, module, export_name, export_value); - CHECK(set_export_result.FromJust()); } // Implements Synthetic Module Record's ResolveExport concrete method: @@ -116,7 +96,7 @@ MaybeHandle<Object> SyntheticModule::Evaluate(Isolate* isolate, Utils::ToLocal(Handle<Module>::cast(module))) .ToLocal(&result)) { isolate->PromoteScheduledException(); - module->RecordError(isolate); + module->RecordErrorUsingPendingException(isolate); return MaybeHandle<Object>(); } |