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

Side by Side Diff: src/api.cc

Issue 2699843003: [wasm] Embedder can control what buffers wasm compilation works on. (Closed)
Patch Set: RangeError Created 3 years, 10 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 | « include/v8.h ('k') | src/isolate.h » ('j') | src/wasm/wasm-js.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 8689 matching lines...) Expand 10 before | Expand all | Expand 10 after
8700 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8700 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8701 isolate->set_oom_behavior(that); 8701 isolate->set_oom_behavior(that);
8702 } 8702 }
8703 8703
8704 void Isolate::SetAllowCodeGenerationFromStringsCallback( 8704 void Isolate::SetAllowCodeGenerationFromStringsCallback(
8705 AllowCodeGenerationFromStringsCallback callback) { 8705 AllowCodeGenerationFromStringsCallback callback) {
8706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8707 isolate->set_allow_code_gen_callback(callback); 8707 isolate->set_allow_code_gen_callback(callback);
8708 } 8708 }
8709 8709
8710 void Isolate::SetAllowWasmCompileCallback(AllowWasmCompileCallback callback) {
8711 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8712 isolate->set_allow_wasm_compile_callback(callback);
8713 }
8714
8715 void Isolate::SetAllowWasmInstantiateCallback(
8716 AllowWasmInstantiateCallback callback) {
8717 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8718 isolate->set_allow_wasm_instantiate_callback(callback);
8719 }
8710 8720
8711 bool Isolate::IsDead() { 8721 bool Isolate::IsDead() {
8712 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8722 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8713 return isolate->IsDead(); 8723 return isolate->IsDead();
8714 } 8724 }
8715 8725
8716 bool Isolate::AddMessageListener(MessageCallback that, Local<Value> data) { 8726 bool Isolate::AddMessageListener(MessageCallback that, Local<Value> data) {
8717 return AddMessageListenerWithErrorLevel(that, kMessageError, data); 8727 return AddMessageListenerWithErrorLevel(that, kMessageError, data);
8718 } 8728 }
8719 8729
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
10274 Address callback_address = 10284 Address callback_address =
10275 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10285 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10276 VMState<EXTERNAL> state(isolate); 10286 VMState<EXTERNAL> state(isolate);
10277 ExternalCallbackScope call_scope(isolate, callback_address); 10287 ExternalCallbackScope call_scope(isolate, callback_address);
10278 callback(info); 10288 callback(info);
10279 } 10289 }
10280 10290
10281 10291
10282 } // namespace internal 10292 } // namespace internal
10283 } // namespace v8 10293 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/isolate.h » ('j') | src/wasm/wasm-js.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698