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

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

Issue 2646713002: [wasm] Enable content policy for wasm compilation. (Closed)
Patch Set: CompileError Created 3 years, 11 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/snapshot/code-serializer.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 <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // Get the script of the wasm module. If the origin of the module is asm.js, the 392 // Get the script of the wasm module. If the origin of the module is asm.js, the
393 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise 393 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise
394 // it's of type TYPE_WASM. 394 // it's of type TYPE_WASM.
395 Handle<Script> GetScript(Handle<JSObject> instance); 395 Handle<Script> GetScript(Handle<JSObject> instance);
396 396
397 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes( 397 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes(
398 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower, 398 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower,
399 ModuleOrigin origin, Handle<Script> asm_js_script, 399 ModuleOrigin origin, Handle<Script> asm_js_script,
400 Vector<const byte> asm_offset_table); 400 Vector<const byte> asm_offset_table);
401 401
402 V8_EXPORT_PRIVATE bool IsWasmCodegenAllowed(Isolate* isolate,
403 Handle<Context> context);
404
402 V8_EXPORT_PRIVATE Handle<JSArray> GetImports(Isolate* isolate, 405 V8_EXPORT_PRIVATE Handle<JSArray> GetImports(Isolate* isolate,
403 Handle<WasmModuleObject> module); 406 Handle<WasmModuleObject> module);
404 V8_EXPORT_PRIVATE Handle<JSArray> GetExports(Isolate* isolate, 407 V8_EXPORT_PRIVATE Handle<JSArray> GetExports(Isolate* isolate,
405 Handle<WasmModuleObject> module); 408 Handle<WasmModuleObject> module);
406 409
407 V8_EXPORT_PRIVATE Handle<JSArray> GetExports(Isolate* isolate, 410 V8_EXPORT_PRIVATE Handle<JSArray> GetExports(Isolate* isolate,
408 Handle<WasmModuleObject> module); 411 Handle<WasmModuleObject> module);
409 412
410 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start, 413 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start,
411 const byte* end, 414 const byte* end,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); 457 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj);
455 void ValidateOrphanedInstance(Isolate* isolate, 458 void ValidateOrphanedInstance(Isolate* isolate,
456 Handle<WasmInstanceObject> instance); 459 Handle<WasmInstanceObject> instance);
457 460
458 } // namespace testing 461 } // namespace testing
459 } // namespace wasm 462 } // namespace wasm
460 } // namespace internal 463 } // namespace internal
461 } // namespace v8 464 } // namespace v8
462 465
463 #endif // V8_WASM_MODULE_H_ 466 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/snapshot/code-serializer.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698