Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index e641d449e1fa31652c28a889494d633542267ad1..baec27d3cc5661af4d47b0a9bfc8d71c332c63ef 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -79,18 +79,9 @@ |
static i::MaybeHandle<i::WasmModuleObject> CreateModuleObject( |
v8::Isolate* isolate, const v8::Local<v8::Value> source, |
- ErrorThrower* thrower, bool async) { |
- i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
- i::MaybeHandle<i::WasmModuleObject> nothing; |
- |
- AllowWasmCompileCallback callback = |
- reinterpret_cast<i::Isolate*>(isolate)->allow_wasm_compile_callback(); |
- if (callback != nullptr && !callback(source, async)) { |
- thrower->RangeError( |
- "Wasm compilation exceeds internal limits in this context for provided " |
- "arguments"); |
- return nothing; |
- } |
+ ErrorThrower* thrower) { |
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
+ i::MaybeHandle<i::JSObject> nothing; |
RawBuffer buffer = GetRawBufferSource(source, thrower); |
if (buffer.start == nullptr) return i::MaybeHandle<i::WasmModuleObject>(); |
@@ -148,7 +139,7 @@ |
return; |
} |
i::MaybeHandle<i::JSObject> module_obj = |
- CreateModuleObject(isolate, args[0], &thrower, true); |
+ CreateModuleObject(isolate, args[0], &thrower); |
if (thrower.error()) { |
resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
@@ -189,7 +180,7 @@ |
} |
i::MaybeHandle<i::JSObject> module_obj = |
- CreateModuleObject(isolate, args[0], &thrower, false); |
+ CreateModuleObject(isolate, args[0], &thrower); |
if (module_obj.is_null()) return; |
v8::ReturnValue<v8::Value> return_value = args.GetReturnValue(); |
@@ -198,8 +189,7 @@ |
MaybeLocal<Value> InstantiateModuleImpl( |
i::Isolate* i_isolate, i::Handle<i::WasmModuleObject> i_module_obj, |
- const v8::FunctionCallbackInfo<v8::Value>& args, ErrorThrower* thrower, |
- bool as_promise) { |
+ const v8::FunctionCallbackInfo<v8::Value>& args, ErrorThrower* thrower) { |
// It so happens that in both the WebAssembly.instantiate, as well as |
// WebAssembly.Instance ctor, the positions of the ffi object and memory |
// are the same. If that changes later, we refactor the consts into |
@@ -220,17 +210,6 @@ |
Local<Object> obj = Local<Object>::Cast(args[kFfiOffset]); |
ffi = i::Handle<i::JSReceiver>::cast(v8::Utils::OpenHandle(*obj)); |
} |
- AllowWasmInstantiateCallback allow_instantiate = |
- i_isolate->allow_wasm_instantiate_callback(); |
- if (allow_instantiate != nullptr && |
- !allow_instantiate(Local<WasmCompiledModule>::Cast(Utils::ToLocal( |
- i::Handle<i::JSObject>::cast(i_module_obj))), |
- Utils::ToLocal(ffi), as_promise)) { |
- thrower->RangeError( |
- "Wasm instantiation exceeds internal limits in this context for " |
- "provided arguments"); |
- return nothing; |
- } |
i::MaybeHandle<i::JSObject> instance = |
i::wasm::WasmModule::Instantiate(i_isolate, thrower, i_module_obj, ffi); |
@@ -337,7 +316,7 @@ |
if (!maybe_module.is_null()) { |
MaybeLocal<Value> instance = InstantiateModuleImpl( |
- i_isolate, maybe_module.ToHandleChecked(), args, &thrower, false); |
+ i_isolate, maybe_module.ToHandleChecked(), args, &thrower); |
if (instance.IsEmpty()) { |
DCHECK(thrower.error()); |
@@ -382,7 +361,7 @@ |
i::Handle<i::WasmModuleObject> module_obj; |
if (want_pair) { |
i::MaybeHandle<i::WasmModuleObject> maybe_module_obj = |
- CreateModuleObject(isolate, args[0], &thrower, true); |
+ CreateModuleObject(isolate, args[0], &thrower); |
if (!maybe_module_obj.ToHandle(&module_obj)) { |
DCHECK(thrower.error()); |
resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
@@ -393,7 +372,7 @@ |
} |
DCHECK(!module_obj.is_null()); |
MaybeLocal<Value> instance = |
- InstantiateModuleImpl(i_isolate, module_obj, args, &thrower, true); |
+ InstantiateModuleImpl(i_isolate, module_obj, args, &thrower); |
if (instance.IsEmpty()) { |
DCHECK(thrower.error()); |
resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |