Skip to content
Permalink
Browse files

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/+/1834352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ross 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}
  • Loading branch information
schuay authored and Commit Bot committed Oct 3, 2019
1 parent 9d04509 commit b4c21a0cba15b1c147b7fbd0b17b861d2675f449
Showing with 2 additions and 2 deletions.
  1. +1 −1 gin/v8_initializer.cc
  2. +1 −1 pdf/pdf_ppapi.cc
@@ -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);

0 comments on commit b4c21a0

Please sign in to comment.
You can’t perform that action at this time.