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

Unified Diff: test/cctest/wasm/test-run-wasm-module.cc

Issue 2342263002: [wasm] Fix test-run-wasm-module tests in debug mode. (Closed)
Patch Set: Fix stale upload Created 4 years, 3 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 | « src/wasm/wasm-js.cc ('k') | test/common/wasm/wasm-module-runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-module.cc
diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
index 7d3ca86a4d60646209979a7e6d58df7a65f66af2..830a1c4893eed4c145906ee47a6233452fef250b 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -7,7 +7,6 @@
#include "src/wasm/encoder.h"
#include "src/wasm/module-decoder.h"
-#include "src/wasm/wasm-js.h"
#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-opcodes.h"
@@ -22,6 +21,7 @@ using namespace v8::internal::compiler;
using namespace v8::internal::wasm;
namespace {
+static bool isolate_setup_for_module = false;
void TestModule(Zone* zone, WasmModuleBuilder* builder,
int32_t expected_result) {
ZoneBuffer buffer(zone);
@@ -29,7 +29,10 @@ void TestModule(Zone* zone, WasmModuleBuilder* builder,
Isolate* isolate = CcTest::InitIsolateOnce();
HandleScope scope(isolate);
- WasmJs::SetupIsolateForWasm(isolate);
+ if (!isolate_setup_for_module) {
Mircea Trofin 2016/09/16 07:13:01 This will only setup the first isolate.
gdeepti 2016/09/16 07:37:21 My understanding is that the isolate being returne
+ testing::SetupIsolateForWasmModule(isolate);
+ isolate_setup_for_module = true;
+ }
int32_t result = testing::CompileAndRunWasmModule(
isolate, buffer.begin(), buffer.end(), ModuleOrigin::kWasmOrigin);
CHECK_EQ(expected_result, result);
@@ -205,7 +208,6 @@ TEST(Run_WasmModule_Serialization) {
v8::WasmCompiledModule::SerializedModule data;
{
HandleScope scope(isolate);
- WasmJs::SetupIsolateForWasm(isolate);
ModuleResult decoding_result = DecodeWasmModule(
isolate, &zone, buffer.begin(), buffer.end(), false, kWasmOrigin);
@@ -236,7 +238,7 @@ TEST(Run_WasmModule_Serialization) {
v8::Local<v8::Context> new_ctx = v8::Context::New(v8_isolate);
new_ctx->Enter();
isolate = reinterpret_cast<Isolate*>(v8_isolate);
- WasmJs::SetupIsolateForWasm(isolate);
+ testing::SetupIsolateForWasmModule(isolate);
Mircea Trofin 2016/09/16 07:13:00 On line 240, we reassign isolate to the v8_isolate
gdeepti 2016/09/16 07:37:21 Can you elaborate what you mean by we won't initia
v8::MaybeLocal<v8::WasmCompiledModule> deserialized =
v8::WasmCompiledModule::Deserialize(v8_isolate, data);
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | test/common/wasm/wasm-module-runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698