File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 2626#include < utility>
2727#include < vector>
2828
29- #include " include/proxy-wasm/limits.h"
30-
3129#include " include/v8-version.h"
3230#include " include/v8.h"
33- #include " src/flags/flags.h"
31+ #include " third_party/absl/strings/str_format.h"
32+ #include " third_party/proxy_wasm_cpp_host/include/proxy-wasm/limits.h"
33+ #include " third_party/v8/include/v8-initialization.h"
3434#include " src/wasm/c-api.h"
3535#include " wasm-api/wasm.hh"
3636
@@ -42,10 +42,12 @@ wasm::Engine *engine() {
4242 static wasm::own<wasm::Engine> engine;
4343
4444 std::call_once (init, []() {
45- ::v8::internal::v8_flags.liftoff = false ;
46- ::v8::internal::v8_flags.wasm_max_mem_pages =
47- PROXY_WASM_HOST_MAX_WASM_MEMORY_SIZE_BYTES / PROXY_WASM_HOST_WASM_MEMORY_PAGE_SIZE_BYTES;
45+ std::string args =
46+ absl::StrFormat (" --wasm_max_mem_pages=%u" , PROXY_WASM_HOST_MAX_WASM_MEMORY_SIZE_BYTES /
47+ PROXY_WASM_HOST_WASM_MEMORY_PAGE_SIZE_BYTES);
48+ ::v8::V8::SetFlagsFromString (args.c_str(), args.size());
4849 ::v8::V8::EnableWebAssemblyTrapHandler (true );
50+
4951 engine = wasm::Engine::make ();
5052 });
5153
You can’t perform that action at this time.
0 commit comments