diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-14 17:40:33 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-12-15 06:56:37 -0500 |
commit | 22089436edec780e03960ecaa74bfc4930126534 (patch) | |
tree | f60662c28d36e8fcce4b734e09af396c68ed1aaf /Userland/Libraries/LibJS/SourceTextModule.cpp | |
parent | 2a66fc6cae8ef09e780cd795bf0b1d7f8844f4ec (diff) | |
download | serenity-22089436edec780e03960ecaa74bfc4930126534.zip |
LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/SourceTextModule.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/SourceTextModule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/SourceTextModule.cpp b/Userland/Libraries/LibJS/SourceTextModule.cpp index 63b3addcaa..8e3f96e877 100644 --- a/Userland/Libraries/LibJS/SourceTextModule.cpp +++ b/Userland/Libraries/LibJS/SourceTextModule.cpp @@ -244,7 +244,7 @@ Result<NonnullGCPtr<SourceTextModule>, Vector<ParserError>> SourceTextModule::pa // [[HostDefined]]: hostDefined, [[ECMAScriptCode]]: body, [[Context]]: empty, [[ImportMeta]]: empty, // [[RequestedModules]]: requestedModules, [[ImportEntries]]: importEntries, [[LocalExportEntries]]: localExportEntries, // [[IndirectExportEntries]]: indirectExportEntries, [[StarExportEntries]]: starExportEntries, [[DFSIndex]]: empty, [[DFSAncestorIndex]]: empty }. - return NonnullGCPtr(*realm.heap().allocate_without_realm<SourceTextModule>( + return realm.heap().allocate_without_realm<SourceTextModule>( realm, filename, host_defined, @@ -255,7 +255,7 @@ Result<NonnullGCPtr<SourceTextModule>, Vector<ParserError>> SourceTextModule::pa move(local_export_entries), move(indirect_export_entries), move(star_export_entries), - move(default_export))); + move(default_export)); } // 16.2.1.6.2 GetExportedNames ( [ exportStarSet ] ), https://tc39.es/ecma262/#sec-getexportednames @@ -347,7 +347,7 @@ ThrowCompletionOr<void> SourceTextModule::initialize_environment(VM& vm) // Note: This must be true because we use a reference. // 5. Let env be NewModuleEnvironment(realm.[[GlobalEnv]]). - auto* environment = vm.heap().allocate_without_realm<ModuleEnvironment>(&realm().global_environment()); + auto environment = vm.heap().allocate_without_realm<ModuleEnvironment>(&realm().global_environment()); // 6. Set module.[[Environment]] to env. set_environment(environment); |