ladybird/Userland/Libraries/LibWeb/HTML/Scripting
Daniel Bertalan 9feb1ce39f LibJS+LibWeb: Apply the Rule of Zero to {Nonnull,}GCPtr<T>
The compiler-generated copy constructor and copy assignment operator
already do the right thing (which is to simply copy the underlying
pointer).

The [Itanium C++ ABI][1] treats any class with non-trivial copy/move
constructors and destructors as non-trivial for the purposes of calls --
even if they are functionally identical to the compiler-generated ones.
If a class is non-trivial, it cannot be passed or returned in registers,
only via an invisible reference, which is worse for codegen. This commit
makes `{Nonnull,}GCPtr` trivial.

As the compiler can be sure that capturing a `GCPtr` by value has no
side effects, a few `-Wunused-lambda-capture` warnings had to be
addressed in LibWeb.

GCC seems to have a bug that prevents `ExceptionOr<Variant<GCPtr<T>>>`
from being implicitly constructed from `GCPtr<T>` after this change. A
non-invasive workaround is to explicitly construct the inner Variant
type.

[1]: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#non-trivial
2023-08-07 22:20:03 -04:00
..
ClassicScript.cpp LibJS/Bytecode: Simplify Bytecode::Interpreter lifetime model 2023-06-22 21:16:17 +02:00
ClassicScript.h LibWeb: Implement the "error to rethrow" mechanism in HTML::Script 2023-05-19 06:20:14 +02:00
Environments.cpp
Environments.h LibWeb+LibJS: Move some code around to make CSS/Parser parse faster 2023-07-11 09:38:37 +03:30
ExceptionReporter.cpp LibJS: Make Error stack traces lazier 2023-05-28 10:03:11 +02:00
ExceptionReporter.h
Fetching.cpp LibJS+LibWeb: Apply the Rule of Zero to {Nonnull,}GCPtr<T> 2023-08-07 22:20:03 -04:00
Fetching.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
ImportMap.h
ModuleMap.cpp
ModuleMap.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
ModuleScript.cpp LibWeb: Implement the "error to rethrow" mechanism in HTML::Script 2023-05-19 06:20:14 +02:00
ModuleScript.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
Script.cpp LibWeb: Implement the "error to rethrow" mechanism in HTML::Script 2023-05-19 06:20:14 +02:00
Script.h LibWeb: Implement the "error to rethrow" mechanism in HTML::Script 2023-05-19 06:20:14 +02:00
TemporaryExecutionContext.cpp LibWeb: Add a helper class to work around empty execution context stack 2023-07-06 15:18:50 -04:00
TemporaryExecutionContext.h LibWeb: Add a helper class to work around empty execution context stack 2023-07-06 15:18:50 -04:00
WindowEnvironmentSettingsObject.cpp
WindowEnvironmentSettingsObject.h
WorkerEnvironmentSettingsObject.h