Unreviewed changes
7 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: third_party/blink/renderer/bindings/modules/v8/v8_context_snapshot_impl.cc
Insertions: 3, Deletions: 2.
@@ -5,6 +5,7 @@
#include "third_party/blink/renderer/bindings/modules/v8/v8_context_snapshot_impl.h"
#include <array>
+#include <tuple>
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_context_snapshot.h"
@@ -240,10 +241,10 @@
// The return value is discarded because whether SetWrapperInInlineStorage
// associates a new wrapper (true) or retains an existing wrapper (false),
// the Document is guaranteed to hold a valid wrapper in inline storage.
- static_cast<void>(
+ std::ignore =
DOMDataStore::SetWrapperInInlineStorage</*entered_context=*/false>(
deserializer_data->isolate, deserializer_data->html_document,
- V8HTMLDocument::GetWrapperTypeInfo(), holder));
+ V8HTMLDocument::GetWrapperTypeInfo(), holder);
}
// We only care for WrapperTypeInfo and do not supply an actual instance of
```
```
The name of the file: third_party/blink/renderer/core/frame/local_frame_back_forward_cache_test.cc
Insertions: 4, Deletions: 2.
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <tuple>
+
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
@@ -193,8 +195,8 @@
// Access WindowProxy before UpdateDocument() installs the next page's
// Document. Verify that reinitializing a context against an existing Document
// whose inline storage already contains a wrapper completes cleanly.
- static_cast<void>(frame->WindowProxy(
- DOMWrapperWorld::MainWorld(script_state->GetIsolate())));
+ std::ignore = frame->WindowProxy(
+ DOMWrapperWorld::MainWorld(script_state->GetIsolate()));
}
} // namespace blink
```
Change information
Commit message:
Allow existing Document wrappers during V8 snapshot deserialization
WindowProxy::InitializeIfNeeded() can force snapshot context creation
against the existing Document. If its inline storage already contains a
wrapper, SetWrapperInInlineStorage safely retains it and returns false.
Removing CHECK(result) is safe because it leaves the existing valid
wrapper intact and allows snapshot deserialization to complete normally
without crashing.
Bug: 511262076
Change-Id: I1b87419d15ba330ebf2d5b4c5e533549b817a411
Cr-Commit-Position: refs/heads/main@{#1652004}
Files:
- M third_party/blink/renderer/bindings/modules/v8/v8_context_snapshot_impl.cc
- M third_party/blink/renderer/core/frame/local_frame_back_forward_cache_test.cc
Change size: S
Delta: 2 files changed, 40 insertions(+), 2 deletions(-)
Branch: refs/heads/main
Submit Requirements:
Code-Review: +1 by Nate Chapin