Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 398a1ea

Browse files
committed
chakrashim: shim new API calls
* Added `Context::AllowCodeGenerationFromStrings` * Added `Isolate::SetAllowWasmCodeGenerationCallback` and `AllowWasmCodeGenerationCallback`
1 parent ced0471 commit 398a1ea

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

deps/chakrashim/include/v8.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,6 +2534,9 @@ class V8_EXPORT MicrotasksScope {
25342534
MicrotasksScope& operator=(const MicrotasksScope&) = delete;
25352535
};
25362536

2537+
typedef bool (*AllowWasmCodeGenerationCallback)(Local<Context> context,
2538+
Local<String> source);
2539+
25372540
enum GCType {
25382541
kGCTypeScavenge = 1 << 0,
25392542
kGCTypeMarkSweepCompact = 1 << 1,
@@ -2804,6 +2807,8 @@ class V8_EXPORT Isolate {
28042807
void SetCaptureStackTraceForUncaughtExceptions(
28052808
bool capture, int frame_limit = 10,
28062809
StackTrace::StackTraceOptions options = StackTrace::kOverview);
2810+
void SetAllowWasmCodeGenerationCallback(
2811+
AllowWasmCodeGenerationCallback callback);
28072812
};
28082813

28092814
class V8_EXPORT JitCodeEvent {
@@ -2986,6 +2991,7 @@ class V8_EXPORT Context {
29862991
Local<Value> GetEmbedderData(int index);
29872992
void SetSecurityToken(Handle<Value> token);
29882993
Handle<Value> GetSecurityToken();
2994+
void AllowCodeGenerationFromStrings(bool allow);
29892995
};
29902996

29912997
class V8_EXPORT Locker {

deps/chakrashim/src/v8context.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,8 @@ Handle<Value> Context::GetSecurityToken() {
159159
return Handle<Value>();
160160
}
161161

162+
void Context::AllowCodeGenerationFromStrings(bool allow) {
163+
// CHAKRA-TODO
164+
}
165+
162166
} // namespace v8

deps/chakrashim/src/v8isolate.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ bool Isolate::GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics,
272272
return true;
273273
}
274274

275+
void Isolate::SetAllowWasmCodeGenerationCallback(
276+
AllowWasmCodeGenerationCallback callback) {
277+
// CHAKRA-TODO: Figure out what to do here
278+
}
279+
275280
Isolate::DisallowJavascriptExecutionScope::DisallowJavascriptExecutionScope(
276281
Isolate* isolate,
277282
OnFailure on_failure) {

0 commit comments

Comments
 (0)