Skip to content

Commit

Permalink
deps: revert 749b9c062ea from upstream V8
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
addaleax committed Oct 13, 2017
1 parent 338b581 commit 82807a8
Show file tree
Hide file tree
Showing 4 changed files with 21,172 additions and 0 deletions.
22 changes: 22 additions & 0 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -6348,6 +6348,8 @@ typedef void (*FailedAccessCheckCallback)(Local<Object> target,
* Callback to check if code generation from strings is allowed. See
* Context::AllowCodeGenerationFromStrings.
*/
typedef bool (*DeprecatedAllowCodeGenerationFromStringsCallback)(
Local<Context> context);
typedef bool (*AllowCodeGenerationFromStringsCallback)(Local<Context> context,
Local<String> source);

Expand Down Expand Up @@ -7636,6 +7638,9 @@ class V8_EXPORT Isolate {
*/
void SetAllowCodeGenerationFromStringsCallback(
AllowCodeGenerationFromStringsCallback callback);
V8_DEPRECATED("Use callback with source parameter.",
void SetAllowCodeGenerationFromStringsCallback(
DeprecatedAllowCodeGenerationFromStringsCallback callback));

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

/**
* Set the callback to invoke to check if code generation from
* strings should be allowed.
*/
V8_INLINE static V8_DEPRECATED(
"Use isolate version",
void SetAllowCodeGenerationFromStringsCallback(
DeprecatedAllowCodeGenerationFromStringsCallback that));

/**
* Check if V8 is dead and therefore unusable. This is the case after
* fatal errors such as out-of-memory situations.
Expand Down Expand Up @@ -10275,6 +10289,14 @@ void* Context::GetAlignedPointerFromEmbedderData(int index) {
#endif
}

void V8::SetAllowCodeGenerationFromStringsCallback(
DeprecatedAllowCodeGenerationFromStringsCallback callback) {
Isolate* isolate = Isolate::GetCurrent();
isolate->SetAllowCodeGenerationFromStringsCallback(
reinterpret_cast<AllowCodeGenerationFromStringsCallback>(callback));
}


bool V8::IsDead() {
Isolate* isolate = Isolate::GetCurrent();
return isolate->IsDead();
Expand Down
Loading

0 comments on commit 82807a8

Please sign in to comment.