From 2c6c9b73c88bd2feea66df8766212c2e586ea9aa Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Thu, 30 Sep 2021 20:02:55 +0300 Subject: LibWeb: Add the Web::Crypto namespace, built-in, and getRandomValues Since we don't support IDL typedefs or unions yet, the responsibility of verifying the type of the argument is temporarily moved from the generated Wrapper to the implementation. --- Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibWeb/WebAssembly') diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp index 8511d69aaa..e95333b82c 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp @@ -361,7 +361,7 @@ JS::Value to_js_value(Wasm::Value& wasm_value, JS::GlobalObject& global_object) { switch (wasm_value.type().kind()) { case Wasm::ValueType::I64: - return global_object.heap().allocate(global_object, Crypto::SignedBigInteger::create_from(wasm_value.to().value())); + return global_object.heap().allocate(global_object, ::Crypto::SignedBigInteger::create_from(wasm_value.to().value())); case Wasm::ValueType::I32: return JS::Value(wasm_value.to().value()); case Wasm::ValueType::F64: @@ -382,7 +382,7 @@ JS::Value to_js_value(Wasm::Value& wasm_value, JS::GlobalObject& global_object) Optional to_webassembly_value(JS::Value value, const Wasm::ValueType& type, JS::GlobalObject& global_object) { - static Crypto::SignedBigInteger two_64 = "1"_sbigint.shift_left(64); + static ::Crypto::SignedBigInteger two_64 = "1"_sbigint.shift_left(64); auto& vm = global_object.vm(); switch (type.kind()) { -- cgit v1.2.3