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

Side by Side Diff: src/wasm/wasm-module.h

Issue 2105013004: Explicitly Disallow heap allocation when wasm memory references are updated (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests Created 4 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 | « src/runtime/runtime-wasm.cc ('k') | src/wasm/wasm-module.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_WASM_MODULE_H_ 5 #ifndef V8_WASM_MODULE_H_
6 #define V8_WASM_MODULE_H_ 6 #define V8_WASM_MODULE_H_
7 7
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/wasm/wasm-opcodes.h" 10 #include "src/wasm/wasm-opcodes.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 WasmDebugInfo* GetDebugInfo(JSObject* wasm); 357 WasmDebugInfo* GetDebugInfo(JSObject* wasm);
358 358
359 // Check whether the given object is a wasm object. 359 // Check whether the given object is a wasm object.
360 // This checks the number and type of internal fields, so it's not 100 percent 360 // This checks the number and type of internal fields, so it's not 100 percent
361 // secure. If it turns out that we need more complete checks, we could add a 361 // secure. If it turns out that we need more complete checks, we could add a
362 // special marker as internal field, which will definitely never occur anywhere 362 // special marker as internal field, which will definitely never occur anywhere
363 // else. 363 // else.
364 bool IsWasmObject(Object* object); 364 bool IsWasmObject(Object* object);
365 365
366 // Update memory references of code objects associated with the module 366 // Update memory references of code objects associated with the module
367 bool UpdateWasmModuleMemory(JSObject* object, Address old_start, 367 bool UpdateWasmModuleMemory(Handle<JSObject> object, Address old_start,
368 Address new_start, uint32_t old_size, 368 Address new_start, uint32_t old_size,
369 uint32_t new_size); 369 uint32_t new_size);
370 370
371 namespace testing { 371 namespace testing {
372 372
373 // Decode, verify, and run the function labeled "main" in the 373 // Decode, verify, and run the function labeled "main" in the
374 // given encoded module. The module should have no imports. 374 // given encoded module. The module should have no imports.
375 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, 375 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
376 const byte* module_end, bool asm_js = false); 376 const byte* module_end, bool asm_js = false);
377 377
378 } // namespace testing 378 } // namespace testing
379 } // namespace wasm 379 } // namespace wasm
380 } // namespace internal 380 } // namespace internal
381 } // namespace v8 381 } // namespace v8
382 382
383 #endif // V8_WASM_MODULE_H_ 383 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-wasm.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698