Commit b4c21a0c authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

Remove use of deprecated function v8::V8::SetNativesDataBlob

With the recent port of the streams API to C++ [0], the natives blob is
now unused and will shortly be removed. V8 API related to the natives
blob is being deprecated [1] and will be removed in the next release.

This CL is the minimal change to keep up with these API deprecations.

In follow-up work, all other infrastructure related to the natives blob
should be removed.

[0] https://crrev.com/c/1746118
[1] https://crrev.com/c/1824944

Bug: v8:7624
Change-Id: I26e409660d177035cdb5d92c317fc2e0174be2f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1834352Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarRoss McIlroy <rmcilroy@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702475}
parent 9d045096
......@@ -266,9 +266,9 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode) {
}
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
// TODO(v8:7624): Remove natives and all remaining infrastructure.
v8::StartupData natives;
GetMappedFileData(g_mapped_natives, &natives);
v8::V8::SetNativesDataBlob(&natives);
if (g_mapped_snapshot) {
v8::StartupData snapshot;
......
......@@ -43,13 +43,13 @@ bool PDFModule::Init() {
pp::Instance* PDFModule::CreateInstance(PP_Instance instance) {
if (!g_sdk_initialized_via_pepper) {
// TODO(v8:7624): Remove natives and all remaining infrastructure.
v8::StartupData natives;
v8::StartupData snapshot;
pp::PDF::GetV8ExternalSnapshotData(pp::InstanceHandle(instance),
&natives.data, &natives.raw_size,
&snapshot.data, &snapshot.raw_size);
if (natives.data) {
v8::V8::SetNativesDataBlob(&natives);
v8::V8::SetSnapshotDataBlob(&snapshot);
}
InitializeSDK(/*enable_v8=*/true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment