Skip to content

Truly independent web browser

LibWeb+LibWebCommon: Remove the big integers of transfer data holders

Shannon Boothf79030473f2e
diff --git a/Libraries/LibWeb/HTML/StructuredSerialize.cpp b/Libraries/LibWeb/HTML/StructuredSerialize.cpp
index e9ff1ff54ed..1ffa0ed454a 100644
--- a/Libraries/LibWeb/HTML/StructuredSerialize.cpp
+++ b/Libraries/LibWeb/HTML/StructuredSerialize.cpp
@@ -9,7 +9,6 @@
#include <AK/Array.h>
#include <AK/Debug.h>
-#include <LibCrypto/BigInt/UnsignedBigInteger.h>
#include <LibJS/HostClassBuilder.h>
#include <LibJS/Runtime/ArrayBuffer.h>
#include <LibJS/Runtime/VM.h>
@@ -201,10 +200,4 @@ WebIDL::ExceptionOr<ByteBuffer> TransferDataDecoder::decode_buffer()
return buffer.release_value();
}
-WebIDL::ExceptionOr<::Crypto::UnsignedBigInteger> TransferDataDecoder::decode_unsigned_big_integer()
-{
- auto buffer = TRY(decode_buffer());
- return ::Crypto::UnsignedBigInteger::import_data(buffer);
-}
-
}
diff --git a/Libraries/LibWeb/HTML/StructuredSerialize.h b/Libraries/LibWeb/HTML/StructuredSerialize.h
index 676d0fea0b4..0b55bc14c93 100644
--- a/Libraries/LibWeb/HTML/StructuredSerialize.h
+++ b/Libraries/LibWeb/HTML/StructuredSerialize.h
@@ -15,7 +15,6 @@
#include <AK/StringView.h>
#include <AK/Vector.h>
#include <LibCore/AnonymousBuffer.h>
-#include <LibCrypto/Forward.h>
#include <LibGC/RootVector.h>
#include <LibIPC/Decoder.h>
#include <LibIPC/Encoder.h>
@@ -49,7 +48,6 @@ public:
}
WebIDL::ExceptionOr<ByteBuffer> decode_buffer();
- WebIDL::ExceptionOr<::Crypto::UnsignedBigInteger> decode_unsigned_big_integer();
// The shared memory of the record that this transfer data belongs to, for transfer-receiving steps that map theirs.
void set_shared_buffers(Vector<Core::AnonymousBuffer> const& shared_buffers) { m_shared_buffers = &shared_buffers; }
diff --git a/Libraries/LibWebCommon/HTML/SerializationRecords.cpp b/Libraries/LibWebCommon/HTML/SerializationRecords.cpp
index e63febc7c0e..90c414a43b3 100644
--- a/Libraries/LibWebCommon/HTML/SerializationRecords.cpp
+++ b/Libraries/LibWebCommon/HTML/SerializationRecords.cpp
@@ -8,7 +8,6 @@
*/
#include <AK/LEB128.h>
-#include <LibCrypto/BigInt/UnsignedBigInteger.h>
#include <LibIPC/Decoder.h>
#include <LibIPC/Encoder.h>
#include <LibWebCommon/HTML/SerializationRecords.h>
@@ -65,14 +64,6 @@ IPC::MessageBuffer TransferDataEncoder::take_buffer() const
return move(m_buffer);
}
-void TransferDataEncoder::encode_unsigned_big_integer(::Crypto::UnsignedBigInteger const& value)
-{
- auto buffer = MUST(ByteBuffer::create_zeroed(value.byte_length()));
- auto written = value.export_data(buffer.bytes());
- VERIFY(written.size() == buffer.size());
- MUST(m_encoder.encode(buffer));
-}
-
void TransferDataEncoder::extend(Vector<TransferDataEncoder> data_holders)
{
for (auto& data_holder : data_holders)
diff --git a/Libraries/LibWebCommon/HTML/SerializationRecords.h b/Libraries/LibWebCommon/HTML/SerializationRecords.h
index df2eea48cae..5c3693716b8 100644
--- a/Libraries/LibWebCommon/HTML/SerializationRecords.h
+++ b/Libraries/LibWebCommon/HTML/SerializationRecords.h
@@ -15,7 +15,6 @@
#include <AK/RefPtr.h>
#include <AK/Vector.h>
#include <LibCore/AnonymousBuffer.h>
-#include <LibCrypto/Forward.h>
#include <LibIPC/Encoder.h>
#include <LibIPC/Forward.h>
#include <LibIPC/Message.h>
@@ -136,7 +135,6 @@ public:
}
void extend(Vector<TransferDataEncoder>);
- void encode_unsigned_big_integer(::Crypto::UnsignedBigInteger const&);
IPC::MessageBuffer const& buffer() const;
IPC::MessageBuffer take_buffer() const;