Skip to content

Commit 1d81f77

Browse files
github-actions[bot]auto user
and
auto user
authored
Auto update version to 12.5.227.13 (#118)
Co-authored-by: auto user <[email protected]>
1 parent 8d4fa78 commit 1d81f77

19 files changed

+487
-117
lines changed

V8_DEFAULT_VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.4.254.17
1+
12.5.227.13

v8_c_api/src/v8include/cppgc/internal/member-storage.h

+6
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ class V8_TRIVIAL_ABI CompressedPointer final {
158158
static V8_INLINE void* Decompress(IntegralType ptr) {
159159
CPPGC_DCHECK(CageBaseGlobal::IsSet());
160160
const uintptr_t base = CageBaseGlobal::Get();
161+
return Decompress(ptr, base);
162+
}
163+
164+
static V8_INLINE void* Decompress(IntegralType ptr, uintptr_t base) {
165+
CPPGC_DCHECK(CageBaseGlobal::IsSet());
166+
CPPGC_DCHECK(base == CageBaseGlobal::Get());
161167
// Treat compressed pointer as signed and cast it to uint64_t, which will
162168
// sign-extend it.
163169
#if defined(CPPGC_2GB_CAGE)

v8_c_api/src/v8include/v8-array-buffer.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ class V8_EXPORT BackingStore : public v8::internal::BackingStoreBase {
8787
* Assumes that the backing_store was allocated by the ArrayBuffer allocator
8888
* of the given isolate.
8989
*/
90+
V8_DEPRECATED(
91+
"Reallocate is unsafe, please do not use. Please allocate a new "
92+
"BackingStore and copy instead.")
9093
static std::unique_ptr<BackingStore> Reallocate(
9194
v8::Isolate* isolate, std::unique_ptr<BackingStore> backing_store,
9295
size_t byte_length);
@@ -179,6 +182,9 @@ class V8_EXPORT ArrayBuffer : public Object {
179182
*
180183
* The default implementation allocates a new block and copies data.
181184
*/
185+
V8_DEPRECATE_SOON(
186+
"Reallocate is unsafe, please do not use. Please allocate new memory "
187+
"and copy instead.")
182188
virtual void* Reallocate(void* data, size_t old_length, size_t new_length);
183189

184190
/**
@@ -287,7 +293,7 @@ class V8_EXPORT ArrayBuffer : public Object {
287293
* preventing JavaScript from ever accessing underlying backing store.
288294
* ArrayBuffer should have been externalized and must be detachable.
289295
*/
290-
V8_DEPRECATE_SOON(
296+
V8_DEPRECATED(
291297
"Use the version which takes a key parameter (passing a null handle is "
292298
"ok).")
293299
void Detach();

v8_c_api/src/v8include/v8-context.h

+21-9
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class V8_EXPORT Context : public Data {
107107
* configured if the default context snapshot contains no pointer embedder
108108
* data, or if no custom startup snapshot is configured in the
109109
* v8::CreateParams used to create the isolate.
110+
*
111+
* \param api_wrapper_deserializer An optional callback used to deserialize
112+
* API wrapper objects that was initially set with v8::Object::Wrap() and then
113+
* serialized using SerializeAPIWrapperCallback.
110114
*/
111115
static Local<Context> New(
112116
Isolate* isolate, ExtensionConfiguration* extensions = nullptr,
@@ -116,17 +120,19 @@ class V8_EXPORT Context : public Data {
116120
DeserializeInternalFieldsCallback(),
117121
MicrotaskQueue* microtask_queue = nullptr,
118122
DeserializeContextDataCallback context_data_deserializer =
119-
DeserializeContextDataCallback());
123+
DeserializeContextDataCallback(),
124+
DeserializeAPIWrapperCallback api_wrapper_deserializer =
125+
DeserializeAPIWrapperCallback());
120126

121127
/**
122128
* Create a new context from a (non-default) context snapshot. There
123129
* is no way to provide a global object template since we do not create
124130
* a new global object from template, but we can reuse a global object.
125131
*
126-
* \param isolate See v8::Context::New.
132+
* \param isolate See v8::Context::New().
127133
*
128134
* \param context_snapshot_index The index of the context snapshot to
129-
* deserialize from. Use v8::Context::New for the default snapshot.
135+
* deserialize from. Use v8::Context::New() for the default snapshot.
130136
*
131137
* \param internal_fields_deserializer An optional callback used
132138
* to deserialize fields set by
@@ -136,19 +142,23 @@ class V8_EXPORT Context : public Data {
136142
* pointer fields in the default context snapshot or if no startup
137143
* snapshot is configured when the isolate is created.
138144
*
139-
* \param extensions See v8::Context::New.
145+
* \param extensions See v8::Context::New().
140146
*
141-
* \param global_object See v8::Context::New.
147+
* \param global_object See v8::Context::New().
142148
*
143149
* \param internal_fields_deserializer Similar to
144-
* internal_fields_deserializer in v8::Context::New but applies to
150+
* internal_fields_deserializer in v8::Context::New() but applies to
145151
* the context specified by the context_snapshot_index.
146152
*
147-
* \param microtask_queue See v8::Context::New.
153+
* \param microtask_queue See v8::Context::New().
148154
*
149155
* \param context_data_deserializer Similar to
150-
* context_data_deserializer in v8::Context::New but applies to
156+
* context_data_deserializer in v8::Context::New() but applies to
151157
* the context specified by the context_snapshot_index.
158+
*
159+
*\param api_wrapper_deserializer Similar to api_wrapper_deserializer in
160+
* v8::Context::New() but applies to the context specified by the
161+
* context_snapshot_index.
152162
*/
153163
static MaybeLocal<Context> FromSnapshot(
154164
Isolate* isolate, size_t context_snapshot_index,
@@ -158,7 +168,9 @@ class V8_EXPORT Context : public Data {
158168
MaybeLocal<Value> global_object = MaybeLocal<Value>(),
159169
MicrotaskQueue* microtask_queue = nullptr,
160170
DeserializeContextDataCallback context_data_deserializer =
161-
DeserializeContextDataCallback());
171+
DeserializeContextDataCallback(),
172+
DeserializeAPIWrapperCallback api_wrapper_deserializer =
173+
DeserializeAPIWrapperCallback());
162174

163175
/**
164176
* Returns an global object that isn't backed by an actual context.

v8_c_api/src/v8include/v8-function-callback.h

+25-1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ class FunctionCallbackInfo {
127127
* referencing this callback was found (which in V8 internally is often
128128
* referred to as holder [sic]).
129129
*/
130+
V8_DEPRECATE_SOON(
131+
"V8 will stop providing access to hidden prototype (i.e. "
132+
"JSGlobalObject). Use This() instead. \n"
133+
"DO NOT try to workaround this by accessing JSGlobalObject via "
134+
"v8::Object::GetPrototype() - it'll be deprecated soon too. \n"
135+
"See http://crbug.com/333672197. ")
130136
V8_INLINE Local<Object> Holder() const;
131137
/** For construct calls, this returns the "new.target" value. */
132138
V8_INLINE Local<Value> NewTarget() const;
@@ -139,6 +145,11 @@ class FunctionCallbackInfo {
139145
/** The ReturnValue for the call. */
140146
V8_INLINE ReturnValue<T> GetReturnValue() const;
141147

148+
// This is a temporary replacement for Holder() added just for the purpose
149+
// of testing the deprecated Holder() machinery until it's removed for real.
150+
// DO NOT use it.
151+
V8_INLINE Local<Object> HolderSoonToBeDeprecated() const;
152+
142153
private:
143154
friend class internal::FunctionCallbackArguments;
144155
friend class internal::CustomArguments<FunctionCallbackInfo>;
@@ -265,7 +276,15 @@ class PropertyCallbackInfo {
265276
*/
266277
V8_INLINE bool ShouldThrowOnError() const;
267278

279+
V8_DEPRECATE_SOON(
280+
"This is a temporary workaround to ease migration of Chromium bindings "
281+
"code to the new interceptors Api")
282+
explicit PropertyCallbackInfo(const PropertyCallbackInfo<void>& info)
283+
: PropertyCallbackInfo(info.args_) {}
284+
268285
private:
286+
template <typename U>
287+
friend class PropertyCallbackInfo;
269288
friend class MacroAssembler;
270289
friend class internal::PropertyCallbackArguments;
271290
friend class internal::CustomArguments<PropertyCallbackInfo>;
@@ -532,10 +551,15 @@ Local<Object> FunctionCallbackInfo<T>::This() const {
532551
}
533552

534553
template <typename T>
535-
Local<Object> FunctionCallbackInfo<T>::Holder() const {
554+
Local<Object> FunctionCallbackInfo<T>::HolderSoonToBeDeprecated() const {
536555
return Local<Object>::FromSlot(&implicit_args_[kHolderIndex]);
537556
}
538557

558+
template <typename T>
559+
Local<Object> FunctionCallbackInfo<T>::Holder() const {
560+
return HolderSoonToBeDeprecated();
561+
}
562+
539563
template <typename T>
540564
Local<Value> FunctionCallbackInfo<T>::NewTarget() const {
541565
return Local<Value>::FromSlot(&implicit_args_[kNewTargetIndex]);

v8_c_api/src/v8include/v8-function.h

-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ class V8_EXPORT Function : public Object {
5959
void SetName(Local<String> name);
6060
Local<Value> GetName() const;
6161

62-
V8_DEPRECATED("No direct replacement")
63-
MaybeLocal<UnboundScript> GetUnboundScript() const;
64-
6562
/**
6663
* Name inferred from variable or property assignment of this function.
6764
* Used to facilitate debugging and profiling of JavaScript code written

v8_c_api/src/v8include/v8-initialization.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,17 @@ class V8_EXPORT V8 {
9797
* is created. It always returns true.
9898
*/
9999
V8_INLINE static bool Initialize() {
100+
#ifdef V8_TARGET_OS_ANDROID
101+
const bool kV8TargetOsIsAndroid = true;
102+
#else
103+
const bool kV8TargetOsIsAndroid = false;
104+
#endif
105+
100106
const int kBuildConfiguration =
101107
(internal::PointerCompressionIsEnabled() ? kPointerCompression : 0) |
102108
(internal::SmiValuesAre31Bits() ? k31BitSmis : 0) |
103-
(internal::SandboxIsEnabled() ? kSandbox : 0);
109+
(internal::SandboxIsEnabled() ? kSandbox : 0) |
110+
(kV8TargetOsIsAndroid ? kTargetOsIsAndroid : 0);
104111
return Initialize(kBuildConfiguration);
105112
}
106113

@@ -271,6 +278,7 @@ class V8_EXPORT V8 {
271278
kPointerCompression = 1 << 0,
272279
k31BitSmis = 1 << 1,
273280
kSandbox = 1 << 2,
281+
kTargetOsIsAndroid = 1 << 3,
274282
};
275283

276284
/**

0 commit comments

Comments
 (0)