summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-11-09 15:22:12 +0100
committerAndreas Kling <kling@serenityos.org>2022-11-09 15:48:08 +0100
commit88b15b08190805bb904577f3f0689ae150b62c7a (patch)
tree67d39644d2b9d3ca17568ebc2ac88415a2aa5617
parent8a87f4fa207da2ec40665e6125bffd2a6f7425e2 (diff)
downloadserenity-88b15b08190805bb904577f3f0689ae150b62c7a.zip
LibJS: Move throw_completion(Value) out of line
This allows us to instrument this function locally without rebuilding 1000+ files.
-rw-r--r--Userland/Libraries/LibJS/Runtime/Completion.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Completion.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Completion.cpp b/Userland/Libraries/LibJS/Runtime/Completion.cpp
index ebd4852178..f09ac80125 100644
--- a/Userland/Libraries/LibJS/Runtime/Completion.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Completion.cpp
@@ -120,4 +120,10 @@ ThrowCompletionOr<Value> await(VM& vm, Value value)
return throw_completion(result);
}
+// 6.2.3.3 ThrowCompletion ( value ), https://tc39.es/ecma262/#sec-throwcompletion
+Completion throw_completion(Value value)
+{
+ return { Completion::Type::Throw, value, {} };
+}
+
}
diff --git a/Userland/Libraries/LibJS/Runtime/Completion.h b/Userland/Libraries/LibJS/Runtime/Completion.h
index abc90d64ec..06baf92914 100644
--- a/Userland/Libraries/LibJS/Runtime/Completion.h
+++ b/Userland/Libraries/LibJS/Runtime/Completion.h
@@ -302,9 +302,6 @@ inline Completion normal_completion(Optional<Value> value)
}
// 6.2.3.3 ThrowCompletion ( value ), https://tc39.es/ecma262/#sec-throwcompletion
-inline Completion throw_completion(Value value)
-{
- return { Completion::Type::Throw, value, {} };
-}
+Completion throw_completion(Value);
}