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

Side by Side Diff: src/api.cc

Issue 2709613008: Merged: [wasm] Embedder can control what buffers wasm compilation works on. (Closed)
Patch Set: 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 8583 matching lines...) Expand 10 before | Expand all | Expand 10 after
8594 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8594 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8595 isolate->set_oom_behavior(that); 8595 isolate->set_oom_behavior(that);
8596 } 8596 }
8597 8597
8598 void Isolate::SetAllowCodeGenerationFromStringsCallback( 8598 void Isolate::SetAllowCodeGenerationFromStringsCallback(
8599 AllowCodeGenerationFromStringsCallback callback) { 8599 AllowCodeGenerationFromStringsCallback callback) {
8600 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8600 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8601 isolate->set_allow_code_gen_callback(callback); 8601 isolate->set_allow_code_gen_callback(callback);
8602 } 8602 }
8603 8603
8604 void Isolate::SetAllowWasmCompileCallback(AllowWasmCompileCallback callback) {
8605 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8606 isolate->set_allow_wasm_compile_callback(callback);
8607 }
8608
8609 void Isolate::SetAllowWasmInstantiateCallback(
8610 AllowWasmInstantiateCallback callback) {
8611 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8612 isolate->set_allow_wasm_instantiate_callback(callback);
8613 }
8604 8614
8605 bool Isolate::IsDead() { 8615 bool Isolate::IsDead() {
8606 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8616 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8607 return isolate->IsDead(); 8617 return isolate->IsDead();
8608 } 8618 }
8609 8619
8610 bool Isolate::AddMessageListener(MessageCallback that, Local<Value> data) { 8620 bool Isolate::AddMessageListener(MessageCallback that, Local<Value> data) {
8611 return AddMessageListenerWithErrorLevel(that, kMessageError, data); 8621 return AddMessageListenerWithErrorLevel(that, kMessageError, data);
8612 } 8622 }
8613 8623
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
10060 Address callback_address = 10070 Address callback_address =
10061 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10071 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10062 VMState<EXTERNAL> state(isolate); 10072 VMState<EXTERNAL> state(isolate);
10063 ExternalCallbackScope call_scope(isolate, callback_address); 10073 ExternalCallbackScope call_scope(isolate, callback_address);
10064 callback(info); 10074 callback(info);
10065 } 10075 }
10066 10076
10067 10077
10068 } // namespace internal 10078 } // namespace internal
10069 } // namespace v8 10079 } // 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