Commit 61242a54 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[cleanup][wasm] Delete dead AsyncCompilationResolver class

R=jkummerow@chromium.org

Bug: v8:10021
Change-Id: Ia90918507bb34d4a35e58d7b2895a6347b853fe3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993970Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65699}
parent e98e52e2
......@@ -7261,38 +7261,6 @@ MaybeLocal<WasmModuleObject> WasmModuleObject::Compile(Isolate* isolate,
Utils::ToLocal(maybe_compiled.ToHandleChecked()));
}
// Resolves the result of streaming compilation.
// TODO(ahaas): Refactor the streaming compilation API so that this class can
// move to wasm-js.cc.
class AsyncCompilationResolver : public i::wasm::CompilationResultResolver {
public:
AsyncCompilationResolver(Isolate* isolate, Local<Promise> promise)
: promise_(
reinterpret_cast<i::Isolate*>(isolate)->global_handles()->Create(
*Utils::OpenHandle(*promise))) {}
~AsyncCompilationResolver() override {
i::GlobalHandles::Destroy(promise_.location());
}
void OnCompilationSucceeded(i::Handle<i::WasmModuleObject> result) override {
i::MaybeHandle<i::Object> promise_result =
i::JSPromise::Resolve(promise_, result);
CHECK_EQ(promise_result.is_null(),
promise_->GetIsolate()->has_pending_exception());
}
void OnCompilationFailed(i::Handle<i::Object> error_reason) override {
i::MaybeHandle<i::Object> promise_result =
i::JSPromise::Reject(promise_, error_reason);
CHECK_EQ(promise_result.is_null(),
promise_->GetIsolate()->has_pending_exception());
}
private:
i::Handle<i::JSPromise> promise_;
};
WasmModuleObjectBuilderStreaming::WasmModuleObjectBuilderStreaming(
Isolate* isolate) {
USE(isolate_);
......
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