summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-02-24 22:38:01 +0100
committerLinus Groh <mail@linusgroh.de>2023-03-13 15:16:20 +0000
commitd5871f5717579fab3c093537c44e3cd467560cdd (patch)
tree9e7e118ae5b7642f0168c5302ee74e9e483ae91c /Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp
parent1d5b45f7d938b15db9da9b12dc4d8b373abd6c7c (diff)
downloadserenity-d5871f5717579fab3c093537c44e3cd467560cdd.zip
AK: Rename Stream::{read,write} to Stream::{read_some,write_some}
Similar to POSIX read, the basic read and write functions of AK::Stream do not have a lower limit of how much data they read or write (apart from "none at all"). Rename the functions to "read some [data]" and "write some [data]" (with "data" being omitted, since everything here is reading and writing data) to make them sufficiently distinct from the functions that ensure to use the entire buffer (which should be the go-to function for most usages). No functional changes, just a lot of new FIXMEs.
Diffstat (limited to 'Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp
index 72ec204d97..ab6ddc0314 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp
@@ -105,7 +105,8 @@ class @legacy_constructor_class@;)~~~");
auto generated_forward_path = LexicalPath(output_path).append("Forward.h"sv).string();
auto generated_forward_file = TRY(Core::File::open(generated_forward_path, Core::File::OpenMode::Write));
- TRY(generated_forward_file->write(generator.as_string_view().bytes()));
+ // FIXME: This should write the entire span.
+ TRY(generated_forward_file->write_some(generator.as_string_view().bytes()));
return {};
}
@@ -208,7 +209,8 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
auto generated_intrinsics_path = LexicalPath(output_path).append("IntrinsicDefinitions.cpp"sv).string();
auto generated_intrinsics_file = TRY(Core::File::open(generated_intrinsics_path, Core::File::OpenMode::Write));
- TRY(generated_intrinsics_file->write(generator.as_string_view().bytes()));
+ // FIXME: This should write the entire span.
+ TRY(generated_intrinsics_file->write_some(generator.as_string_view().bytes()));
return {};
}
@@ -234,7 +236,8 @@ void add_@global_object_snake_name@_exposed_interfaces(JS::Object&);
auto generated_header_path = LexicalPath(output_path).append(DeprecatedString::formatted("{}ExposedInterfaces.h", class_name)).string();
auto generated_header_file = TRY(Core::File::open(generated_header_path, Core::File::OpenMode::Write));
- TRY(generated_header_file->write(generator.as_string_view().bytes()));
+ // FIXME: This should write the entire span.
+ TRY(generated_header_file->write_some(generator.as_string_view().bytes()));
return {};
}
@@ -303,7 +306,8 @@ void add_@global_object_snake_name@_exposed_interfaces(JS::Object& global)
auto generated_implementation_path = LexicalPath(output_path).append(DeprecatedString::formatted("{}ExposedInterfaces.cpp", class_name)).string();
auto generated_implementation_file = TRY(Core::File::open(generated_implementation_path, Core::File::OpenMode::Write));
- TRY(generated_implementation_file->write(generator.as_string_view().bytes()));
+ // FIXME: This should write the entire span.
+ TRY(generated_implementation_file->write_some(generator.as_string_view().bytes()));
return {};
}