diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-13 20:49:50 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-14 09:59:45 +0000 |
commit | a4d85cd522e22750ff6449d21f3fbb9c9f86c7c1 (patch) | |
tree | 3051581a27b1e26a06f8f1e9758bb1087012ef84 /Userland/Libraries/LibWeb/HTML/Scripting | |
parent | ddc6e139a612154611e82493ef2bbe886a73814b (diff) | |
download | serenity-a4d85cd522e22750ff6449d21f3fbb9c9f86c7c1.zip |
LibJS: Convert Promise::create() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Scripting')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp index b0536be3b7..dfc380302a 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp +++ b/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp @@ -112,7 +112,7 @@ JS::Promise* JavaScriptModuleScript::run(PreventErrorReporting) // 2. Check if we can run script with settings. If this returns "do not run", then return a promise resolved with undefined. if (settings.can_run_script() == RunScriptDecision::DoNotRun) { - auto* promise = JS::Promise::create(settings.realm()); + auto promise = JS::Promise::create(settings.realm()); promise->fulfill(JS::js_undefined()); return promise; } @@ -140,7 +140,7 @@ JS::Promise* JavaScriptModuleScript::run(PreventErrorReporting) // If Evaluate fails to complete as a result of the user agent aborting the running script, // then set evaluationPromise to a promise rejected with a new "QuotaExceededError" DOMException. if (elevation_promise_or_error.is_error()) { - auto* promise = JS::Promise::create(settings_object().realm()); + auto promise = JS::Promise::create(settings_object().realm()); promise->reject(WebIDL::QuotaExceededError::create(settings_object().realm(), "Failed to evaluate module script").ptr()); evaluation_promise = promise; |