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

Side by Side Diff: test/common/wasm/wasm-module-runner.cc

Issue 2929853003: Fix use of history timers in background threads. (Closed)
Patch Set: Make explicit when async_counters is needed. Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/common/wasm/wasm-module-runner.h" 5 #include "test/common/wasm/wasm-module-runner.h"
6 6
7 #include "src/handles.h" 7 #include "src/handles.h"
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 12 matching lines...) Expand all
23 23
24 uint32_t GetMinModuleMemSize(const WasmModule* module) { 24 uint32_t GetMinModuleMemSize(const WasmModule* module) {
25 return WasmModule::kPageSize * module->min_mem_pages; 25 return WasmModule::kPageSize * module->min_mem_pages;
26 } 26 }
27 27
28 std::unique_ptr<WasmModule> DecodeWasmModuleForTesting( 28 std::unique_ptr<WasmModule> DecodeWasmModuleForTesting(
29 Isolate* isolate, ErrorThrower* thrower, const byte* module_start, 29 Isolate* isolate, ErrorThrower* thrower, const byte* module_start,
30 const byte* module_end, ModuleOrigin origin, bool verify_functions) { 30 const byte* module_end, ModuleOrigin origin, bool verify_functions) {
31 // Decode the module, but don't verify function bodies, since we'll 31 // Decode the module, but don't verify function bodies, since we'll
32 // be compiling them anyway. 32 // be compiling them anyway.
33 ModuleResult decoding_result = DecodeWasmModule( 33 ModuleResult decoding_result = SyncDecodeWasmModule(
34 isolate, module_start, module_end, verify_functions, origin); 34 isolate, module_start, module_end, verify_functions, origin);
35 35
36 if (decoding_result.failed()) { 36 if (decoding_result.failed()) {
37 // Module verification failed. throw. 37 // Module verification failed. throw.
38 thrower->CompileError("DecodeWasmModule failed: %s", 38 thrower->CompileError("DecodeWasmModule failed: %s",
39 decoding_result.error_msg().c_str()); 39 decoding_result.error_msg().c_str());
40 } 40 }
41 41
42 return std::move(decoding_result.val); 42 return std::move(decoding_result.val);
43 } 43 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 void SetupIsolateForWasmModule(Isolate* isolate) { 152 void SetupIsolateForWasmModule(Isolate* isolate) {
153 WasmJs::Install(isolate); 153 WasmJs::Install(isolate);
154 } 154 }
155 155
156 } // namespace testing 156 } // namespace testing
157 } // namespace wasm 157 } // namespace wasm
158 } // namespace internal 158 } // namespace internal
159 } // namespace v8 159 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698