summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-10-02 10:28:18 +0100
committerLinus Groh <mail@linusgroh.de>2022-10-02 23:02:27 +0100
commit4986fa262cbd5f60c76a79aa4f01384328eefde1 (patch)
tree5a5948bb591a05fc0d5f51caff9792602cb12a33 /Userland
parented2aa6459da5c1aa85de5566229a4fee3f5399fd (diff)
downloadserenity-4986fa262cbd5f60c76a79aa4f01384328eefde1.zip
LibJS: Update outdated PROMISE_DEBUG logging
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Promise.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Promise.cpp b/Userland/Libraries/LibJS/Runtime/Promise.cpp
index d114b094d7..4b6d5d74e5 100644
--- a/Userland/Libraries/LibJS/Runtime/Promise.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Promise.cpp
@@ -146,7 +146,7 @@ Promise::ResolvingFunctions Promise::create_resolving_functions()
auto then_job_callback = vm.host_make_job_callback(then_action.as_function());
// 14. Let job be NewPromiseResolveThenableJob(promise, resolution, thenJobCallback).
- dbgln_if(PROMISE_DEBUG, "[Promise @ {} / PromiseResolvingFunction]: Creating PromiseResolveThenableJob for thenable {}", &promise, resolution);
+ dbgln_if(PROMISE_DEBUG, "[Promise @ {} / PromiseResolvingFunction]: Creating PromiseJob for thenable {}", &promise, resolution);
auto job = create_promise_resolve_thenable_job(vm, promise, resolution, move(then_job_callback));
// 15. Perform HostEnqueuePromiseJob(job.[[Job]], job.[[Realm]]).
@@ -270,7 +270,7 @@ void Promise::trigger_reactions() const
// 1. For each element reaction of reactions, do
for (auto& reaction : reactions) {
// a. Let job be NewPromiseReactionJob(reaction, argument).
- dbgln_if(PROMISE_DEBUG, "[Promise @ {} / trigger_reactions()]: Creating PromiseReactionJob for PromiseReaction @ {} with argument {}", this, &reaction, m_result);
+ dbgln_if(PROMISE_DEBUG, "[Promise @ {} / trigger_reactions()]: Creating PromiseJob for PromiseReaction @ {} with argument {}", this, &reaction, m_result);
auto [job, realm] = create_promise_reaction_job(vm, *reaction, m_result);
// b. Perform HostEnqueuePromiseJob(job.[[Job]], job.[[Realm]]).
@@ -340,7 +340,7 @@ Value Promise::perform_then(Value on_fulfilled, Value on_rejected, Optional<Prom
auto value = m_result;
// b. Let fulfillJob be NewPromiseReactionJob(fulfillReaction, value).
- dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: State is State::Fulfilled, creating PromiseReactionJob for PromiseReaction @ {} with argument {}", this, fulfill_reaction, value);
+ dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: State is State::Fulfilled, creating PromiseJob for PromiseReaction @ {} with argument {}", this, fulfill_reaction, value);
auto [fulfill_job, realm] = create_promise_reaction_job(vm, *fulfill_reaction, value);
// c. Perform HostEnqueuePromiseJob(fulfillJob.[[Job]], fulfillJob.[[Realm]]).
@@ -360,7 +360,7 @@ Value Promise::perform_then(Value on_fulfilled, Value on_rejected, Optional<Prom
vm.host_promise_rejection_tracker(*this, RejectionOperation::Handle);
// d. Let rejectJob be NewPromiseReactionJob(rejectReaction, reason).
- dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: State is State::Rejected, creating PromiseReactionJob for PromiseReaction @ {} with argument {}", this, reject_reaction, reason);
+ dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: State is State::Rejected, creating PromiseJob for PromiseReaction @ {} with argument {}", this, reject_reaction, reason);
auto [reject_job, realm] = create_promise_reaction_job(vm, *reject_reaction, reason);
// e. Perform HostEnqueuePromiseJob(rejectJob.[[Job]], rejectJob.[[Realm]]).
@@ -378,14 +378,14 @@ Value Promise::perform_then(Value on_fulfilled, Value on_rejected, Optional<Prom
// 13. If resultCapability is undefined, then
if (!result_capability.has_value()) {
// a. Return undefined.
- dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: No ResultCapability, returning undefined", this);
+ dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: No result PromiseCapability, returning undefined", this);
return js_undefined();
}
// 14. Else,
// a. Return resultCapability.[[Promise]].
auto* promise = result_capability.value().promise;
- dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: Returning Promise @ {} from ResultCapability @ {}", this, promise, &result_capability.value());
+ dbgln_if(PROMISE_DEBUG, "[Promise @ {} / perform_then()]: Returning Promise @ {} from result PromiseCapability @ {}", this, promise, &result_capability.value());
return promise;
}