Skip to content

Commit 82807a8

Browse files
committed
deps: revert 749b9c062ea from upstream V8
Original commit message: Remove deprecated allow code-gen callback BUG=chromium:732736 R=marja@chromium.org Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I2c0a96b76ae977e53a418d22175bcc487f548786 Reviewed-on: https://chromium-review.googlesource.com/543238 Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{nodejs#47509}
1 parent 338b581 commit 82807a8

File tree

4 files changed

+21172
-0
lines changed

4 files changed

+21172
-0
lines changed

deps/v8/include/v8.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6348,6 +6348,8 @@ typedef void (*FailedAccessCheckCallback)(Local<Object> target,
63486348
* Callback to check if code generation from strings is allowed. See
63496349
* Context::AllowCodeGenerationFromStrings.
63506350
*/
6351+
typedef bool (*DeprecatedAllowCodeGenerationFromStringsCallback)(
6352+
Local<Context> context);
63516353
typedef bool (*AllowCodeGenerationFromStringsCallback)(Local<Context> context,
63526354
Local<String> source);
63536355

@@ -7636,6 +7638,9 @@ class V8_EXPORT Isolate {
76367638
*/
76377639
void SetAllowCodeGenerationFromStringsCallback(
76387640
AllowCodeGenerationFromStringsCallback callback);
7641+
V8_DEPRECATED("Use callback with source parameter.",
7642+
void SetAllowCodeGenerationFromStringsCallback(
7643+
DeprecatedAllowCodeGenerationFromStringsCallback callback));
76397644

76407645
/**
76417646
* Embedder over{ride|load} injection points for wasm APIs. The expectation
@@ -7796,6 +7801,15 @@ class V8_EXPORT V8 {
77967801
"Use isolate version",
77977802
void SetFatalErrorHandler(FatalErrorCallback that));
77987803

7804+
/**
7805+
* Set the callback to invoke to check if code generation from
7806+
* strings should be allowed.
7807+
*/
7808+
V8_INLINE static V8_DEPRECATED(
7809+
"Use isolate version",
7810+
void SetAllowCodeGenerationFromStringsCallback(
7811+
DeprecatedAllowCodeGenerationFromStringsCallback that));
7812+
77997813
/**
78007814
* Check if V8 is dead and therefore unusable. This is the case after
78017815
* fatal errors such as out-of-memory situations.
@@ -10275,6 +10289,14 @@ void* Context::GetAlignedPointerFromEmbedderData(int index) {
1027510289
#endif
1027610290
}
1027710291

10292+
void V8::SetAllowCodeGenerationFromStringsCallback(
10293+
DeprecatedAllowCodeGenerationFromStringsCallback callback) {
10294+
Isolate* isolate = Isolate::GetCurrent();
10295+
isolate->SetAllowCodeGenerationFromStringsCallback(
10296+
reinterpret_cast<AllowCodeGenerationFromStringsCallback>(callback));
10297+
}
10298+
10299+
1027810300
bool V8::IsDead() {
1027910301
Isolate* isolate = Isolate::GetCurrent();
1028010302
return isolate->IsDead();

0 commit comments

Comments
 (0)