Commit 5e55121e authored by Andreas Haas's avatar Andreas Haas Committed by V8 LUCI CQ

[wasm] Remove WasmModuleObjectBulderStreaming

The class is dead code, and has not been used for years. I tried to
deprecate the class first, but this caused build errors on GCC [1].
That's why this CL just deletes the class. Deleting the class is okay
because this class was part of the original implementation of streaming
compilation. There is only a single embedder who uses streaming
compilation, which is Chrome, and Chrome switched to the new API
already years ago. If there were other embedders that use this class,
then this embedder would already have no working implementation of
streaming compilation for years.

R=adamk@chromium.org

Bug: v8:12926
Change-Id: I3342167245822cf8ee52d9632cba236fb1b0646c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3714236
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81421}
parent 7ddb0d6b
......@@ -217,41 +217,6 @@ class V8_EXPORT WasmStreaming final {
std::unique_ptr<WasmStreamingImpl> impl_;
};
// TODO(mtrofin): when streaming compilation is done, we can rename this
// to simply WasmModuleObjectBuilder
class V8_EXPORT WasmModuleObjectBuilderStreaming final {
public:
explicit WasmModuleObjectBuilderStreaming(Isolate* isolate);
/**
* The buffer passed into OnBytesReceived is owned by the caller.
*/
void OnBytesReceived(const uint8_t*, size_t size);
void Finish();
/**
* Abort streaming compilation. If {exception} has a value, then the promise
* associated with streaming compilation is rejected with that value. If
* {exception} does not have value, the promise does not get rejected.
*/
void Abort(MaybeLocal<Value> exception);
Local<Promise> GetPromise();
~WasmModuleObjectBuilderStreaming() = default;
private:
WasmModuleObjectBuilderStreaming(const WasmModuleObjectBuilderStreaming&) =
delete;
WasmModuleObjectBuilderStreaming(WasmModuleObjectBuilderStreaming&&) =
default;
WasmModuleObjectBuilderStreaming& operator=(
const WasmModuleObjectBuilderStreaming&) = delete;
WasmModuleObjectBuilderStreaming& operator=(
WasmModuleObjectBuilderStreaming&&) = default;
Isolate* v8_isolate_ = nullptr;
v8::Global<Promise> promise_;
std::shared_ptr<internal::wasm::StreamingDecoder> streaming_decoder_;
};
} // namespace v8
#endif // INCLUDE_V8_WASM_H_
......@@ -7904,20 +7904,6 @@ MaybeLocal<WasmModuleObject> WasmModuleObject::Compile(
#endif // V8_ENABLE_WEBASSEMBLY
}
WasmModuleObjectBuilderStreaming::WasmModuleObjectBuilderStreaming(
Isolate* v8_isolate) {
USE(v8_isolate_);
}
Local<Promise> WasmModuleObjectBuilderStreaming::GetPromise() { return {}; }
void WasmModuleObjectBuilderStreaming::OnBytesReceived(const uint8_t* bytes,
size_t size) {}
void WasmModuleObjectBuilderStreaming::Finish() {}
void WasmModuleObjectBuilderStreaming::Abort(MaybeLocal<Value> exception) {}
void* v8::ArrayBuffer::Allocator::Reallocate(void* data, size_t old_length,
size_t new_length) {
if (old_length == new_length) return data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment