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

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

Issue 2010493002: Check CallSite arguments more rigorously (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add regression test case Created 4 years, 6 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-internal.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/wasm/wasm-opcodes.h" 8 #include "src/wasm/wasm-opcodes.h"
9 #include "src/wasm/wasm-result.h" 9 #include "src/wasm/wasm-result.h"
10 10
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // For testing. Decode, verify, and run the last exported function in the 313 // For testing. Decode, verify, and run the last exported function in the
314 // given decoded module. 314 // given decoded module.
315 int32_t CompileAndRunWasmModule(Isolate* isolate, const WasmModule* module); 315 int32_t CompileAndRunWasmModule(Isolate* isolate, const WasmModule* module);
316 316
317 // Extract a function name from the given wasm object. 317 // Extract a function name from the given wasm object.
318 // Returns a null handle if the function is unnamed or the name is not a valid 318 // Returns a null handle if the function is unnamed or the name is not a valid
319 // UTF-8 string. 319 // UTF-8 string.
320 MaybeHandle<String> GetWasmFunctionName(Handle<JSObject> wasm, 320 MaybeHandle<String> GetWasmFunctionName(Handle<JSObject> wasm,
321 uint32_t func_index); 321 uint32_t func_index);
322 322
323 // Check whether the given object is a wasm object.
324 // This checks the number and type of internal fields, so it's not 100 percent
325 // secure. If it turns out that we need more complete checks, we could add a
326 // special marker as internal field, which will definitely never occur anywhere
327 // else.
328 bool IsWasmObject(Handle<JSObject> object);
329
323 } // namespace wasm 330 } // namespace wasm
324 } // namespace internal 331 } // namespace internal
325 } // namespace v8 332 } // namespace v8
326 333
327 #endif // V8_WASM_MODULE_H_ 334 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698