mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Issue #618 - Align error handling for module scripts with the spec (again)
This updates module implementation to match spec regarding handling of instantiation errors, after it was changed yet again, this time to not remember instantiation errors, but instead immediately rethrow applicable ones. Ref: BZ 1420420
This commit is contained in:
parent
933fb54415
commit
0d874713ef
20 changed files with 331 additions and 266 deletions
|
|
@ -107,8 +107,8 @@ class IndirectBindingMap
|
|||
|
||||
void trace(JSTracer* trc);
|
||||
|
||||
bool putNew(JSContext* cx, HandleId name,
|
||||
HandleModuleEnvironmentObject environment, HandleId localName);
|
||||
bool put(JSContext* cx, HandleId name,
|
||||
HandleModuleEnvironmentObject environment, HandleId localName);
|
||||
|
||||
size_t count() const {
|
||||
return map_.count();
|
||||
|
|
@ -218,7 +218,7 @@ class ModuleObject : public NativeObject
|
|||
EnvironmentSlot,
|
||||
NamespaceSlot,
|
||||
StatusSlot,
|
||||
ErrorSlot,
|
||||
EvaluationErrorSlot,
|
||||
HostDefinedSlot,
|
||||
RequestedModulesSlot,
|
||||
ImportEntriesSlot,
|
||||
|
|
@ -238,8 +238,8 @@ class ModuleObject : public NativeObject
|
|||
"EnvironmentSlot must match self-hosting define");
|
||||
static_assert(StatusSlot == MODULE_OBJECT_STATUS_SLOT,
|
||||
"StatusSlot must match self-hosting define");
|
||||
static_assert(ErrorSlot == MODULE_OBJECT_ERROR_SLOT,
|
||||
"ErrorSlot must match self-hosting define");
|
||||
static_assert(EvaluationErrorSlot == MODULE_OBJECT_EVALUATION_ERROR_SLOT,
|
||||
"EvaluationErrorSlot must match self-hosting define");
|
||||
static_assert(DFSIndexSlot == MODULE_OBJECT_DFS_INDEX_SLOT,
|
||||
"DFSIndexSlot must match self-hosting define");
|
||||
static_assert(DFSAncestorIndexSlot == MODULE_OBJECT_DFS_ANCESTOR_INDEX_SLOT,
|
||||
|
|
@ -269,7 +269,8 @@ class ModuleObject : public NativeObject
|
|||
ModuleEnvironmentObject* environment() const;
|
||||
ModuleNamespaceObject* namespace_();
|
||||
ModuleStatus status() const;
|
||||
Value error() const;
|
||||
bool hadEvaluationError() const;
|
||||
Value evaluationError() const;
|
||||
Value hostDefinedField() const;
|
||||
ArrayObject& requestedModules() const;
|
||||
ArrayObject& importEntries() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue