Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1361)

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp

Issue 2805403002: [wasm] Removed redundant promise resolution in wasm bindings (Closed)
Patch Set: Post - blink-reformat. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp b/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp
index 637e75fe29d9c7213adf51740695b0dc4c7802c5..59e20fee4dddc8d9b4c23dc584e2f85183aac4ec 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp
@@ -207,21 +207,16 @@ bool WasmCompileOverload(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Local<v8::Function> compile_callback =
v8::Function::New(isolate, CompileFromResponseCallback);
- ScriptPromiseResolver* script_promise_resolver =
- ScriptPromiseResolver::Create(script_state);
// treat either case of parameter as
// Promise.resolve(parameter)
// as per https://www.w3.org/2001/tag/doc/promises-guide#resolve-arguments
// Ending with:
// return Promise.resolve(parameter).then(compileCallback);
- ScriptPromise parameter_as_promise = script_promise_resolver->Promise();
V8SetReturnValue(args, ScriptPromise::Cast(script_state, args[0])
.Then(compile_callback)
.V8Value());
- // resolve the first parameter promise.
- script_promise_resolver->Resolve(ScriptValue::From(script_state, args[0]));
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698