Skip to content

Commit

Permalink
Auto update version to 12.5.227.13 (#118)
Browse files Browse the repository at this point in the history
Co-authored-by: auto user <auto@redis.com>
  • Loading branch information
github-actions[bot] and auto user authored May 23, 2024
1 parent 8d4fa78 commit 1d81f77
Show file tree
Hide file tree
Showing 19 changed files with 487 additions and 117 deletions.
2 changes: 1 addition & 1 deletion V8_DEFAULT_VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.4.254.17
12.5.227.13
6 changes: 6 additions & 0 deletions v8_c_api/src/v8include/cppgc/internal/member-storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ class V8_TRIVIAL_ABI CompressedPointer final {
static V8_INLINE void* Decompress(IntegralType ptr) {
CPPGC_DCHECK(CageBaseGlobal::IsSet());
const uintptr_t base = CageBaseGlobal::Get();
return Decompress(ptr, base);
}

static V8_INLINE void* Decompress(IntegralType ptr, uintptr_t base) {
CPPGC_DCHECK(CageBaseGlobal::IsSet());
CPPGC_DCHECK(base == CageBaseGlobal::Get());
// Treat compressed pointer as signed and cast it to uint64_t, which will
// sign-extend it.
#if defined(CPPGC_2GB_CAGE)
Expand Down
8 changes: 7 additions & 1 deletion v8_c_api/src/v8include/v8-array-buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class V8_EXPORT BackingStore : public v8::internal::BackingStoreBase {
* Assumes that the backing_store was allocated by the ArrayBuffer allocator
* of the given isolate.
*/
V8_DEPRECATED(
"Reallocate is unsafe, please do not use. Please allocate a new "
"BackingStore and copy instead.")
static std::unique_ptr<BackingStore> Reallocate(
v8::Isolate* isolate, std::unique_ptr<BackingStore> backing_store,
size_t byte_length);
Expand Down Expand Up @@ -179,6 +182,9 @@ class V8_EXPORT ArrayBuffer : public Object {
*
* The default implementation allocates a new block and copies data.
*/
V8_DEPRECATE_SOON(
"Reallocate is unsafe, please do not use. Please allocate new memory "
"and copy instead.")
virtual void* Reallocate(void* data, size_t old_length, size_t new_length);

/**
Expand Down Expand Up @@ -287,7 +293,7 @@ class V8_EXPORT ArrayBuffer : public Object {
* preventing JavaScript from ever accessing underlying backing store.
* ArrayBuffer should have been externalized and must be detachable.
*/
V8_DEPRECATE_SOON(
V8_DEPRECATED(
"Use the version which takes a key parameter (passing a null handle is "
"ok).")
void Detach();
Expand Down
30 changes: 21 additions & 9 deletions v8_c_api/src/v8include/v8-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ class V8_EXPORT Context : public Data {
* configured if the default context snapshot contains no pointer embedder
* data, or if no custom startup snapshot is configured in the
* v8::CreateParams used to create the isolate.
*
* \param api_wrapper_deserializer An optional callback used to deserialize
* API wrapper objects that was initially set with v8::Object::Wrap() and then
* serialized using SerializeAPIWrapperCallback.
*/
static Local<Context> New(
Isolate* isolate, ExtensionConfiguration* extensions = nullptr,
Expand All @@ -116,17 +120,19 @@ class V8_EXPORT Context : public Data {
DeserializeInternalFieldsCallback(),
MicrotaskQueue* microtask_queue = nullptr,
DeserializeContextDataCallback context_data_deserializer =
DeserializeContextDataCallback());
DeserializeContextDataCallback(),
DeserializeAPIWrapperCallback api_wrapper_deserializer =
DeserializeAPIWrapperCallback());

/**
* Create a new context from a (non-default) context snapshot. There
* is no way to provide a global object template since we do not create
* a new global object from template, but we can reuse a global object.
*
* \param isolate See v8::Context::New.
* \param isolate See v8::Context::New().
*
* \param context_snapshot_index The index of the context snapshot to
* deserialize from. Use v8::Context::New for the default snapshot.
* deserialize from. Use v8::Context::New() for the default snapshot.
*
* \param internal_fields_deserializer An optional callback used
* to deserialize fields set by
Expand All @@ -136,19 +142,23 @@ class V8_EXPORT Context : public Data {
* pointer fields in the default context snapshot or if no startup
* snapshot is configured when the isolate is created.
*
* \param extensions See v8::Context::New.
* \param extensions See v8::Context::New().
*
* \param global_object See v8::Context::New.
* \param global_object See v8::Context::New().
*
* \param internal_fields_deserializer Similar to
* internal_fields_deserializer in v8::Context::New but applies to
* internal_fields_deserializer in v8::Context::New() but applies to
* the context specified by the context_snapshot_index.
*
* \param microtask_queue See v8::Context::New.
* \param microtask_queue See v8::Context::New().
*
* \param context_data_deserializer Similar to
* context_data_deserializer in v8::Context::New but applies to
* context_data_deserializer in v8::Context::New() but applies to
* the context specified by the context_snapshot_index.
*
*\param api_wrapper_deserializer Similar to api_wrapper_deserializer in
* v8::Context::New() but applies to the context specified by the
* context_snapshot_index.
*/
static MaybeLocal<Context> FromSnapshot(
Isolate* isolate, size_t context_snapshot_index,
Expand All @@ -158,7 +168,9 @@ class V8_EXPORT Context : public Data {
MaybeLocal<Value> global_object = MaybeLocal<Value>(),
MicrotaskQueue* microtask_queue = nullptr,
DeserializeContextDataCallback context_data_deserializer =
DeserializeContextDataCallback());
DeserializeContextDataCallback(),
DeserializeAPIWrapperCallback api_wrapper_deserializer =
DeserializeAPIWrapperCallback());

/**
* Returns an global object that isn't backed by an actual context.
Expand Down
26 changes: 25 additions & 1 deletion v8_c_api/src/v8include/v8-function-callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ class FunctionCallbackInfo {
* referencing this callback was found (which in V8 internally is often
* referred to as holder [sic]).
*/
V8_DEPRECATE_SOON(
"V8 will stop providing access to hidden prototype (i.e. "
"JSGlobalObject). Use This() instead. \n"
"DO NOT try to workaround this by accessing JSGlobalObject via "
"v8::Object::GetPrototype() - it'll be deprecated soon too. \n"
"See http://crbug.com/333672197. ")
V8_INLINE Local<Object> Holder() const;
/** For construct calls, this returns the "new.target" value. */
V8_INLINE Local<Value> NewTarget() const;
Expand All @@ -139,6 +145,11 @@ class FunctionCallbackInfo {
/** The ReturnValue for the call. */
V8_INLINE ReturnValue<T> GetReturnValue() const;

// This is a temporary replacement for Holder() added just for the purpose
// of testing the deprecated Holder() machinery until it's removed for real.
// DO NOT use it.
V8_INLINE Local<Object> HolderSoonToBeDeprecated() const;

private:
friend class internal::FunctionCallbackArguments;
friend class internal::CustomArguments<FunctionCallbackInfo>;
Expand Down Expand Up @@ -265,7 +276,15 @@ class PropertyCallbackInfo {
*/
V8_INLINE bool ShouldThrowOnError() const;

V8_DEPRECATE_SOON(
"This is a temporary workaround to ease migration of Chromium bindings "
"code to the new interceptors Api")
explicit PropertyCallbackInfo(const PropertyCallbackInfo<void>& info)
: PropertyCallbackInfo(info.args_) {}

private:
template <typename U>
friend class PropertyCallbackInfo;
friend class MacroAssembler;
friend class internal::PropertyCallbackArguments;
friend class internal::CustomArguments<PropertyCallbackInfo>;
Expand Down Expand Up @@ -532,10 +551,15 @@ Local<Object> FunctionCallbackInfo<T>::This() const {
}

template <typename T>
Local<Object> FunctionCallbackInfo<T>::Holder() const {
Local<Object> FunctionCallbackInfo<T>::HolderSoonToBeDeprecated() const {
return Local<Object>::FromSlot(&implicit_args_[kHolderIndex]);
}

template <typename T>
Local<Object> FunctionCallbackInfo<T>::Holder() const {
return HolderSoonToBeDeprecated();
}

template <typename T>
Local<Value> FunctionCallbackInfo<T>::NewTarget() const {
return Local<Value>::FromSlot(&implicit_args_[kNewTargetIndex]);
Expand Down
3 changes: 0 additions & 3 deletions v8_c_api/src/v8include/v8-function.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ class V8_EXPORT Function : public Object {
void SetName(Local<String> name);
Local<Value> GetName() const;

V8_DEPRECATED("No direct replacement")
MaybeLocal<UnboundScript> GetUnboundScript() const;

/**
* Name inferred from variable or property assignment of this function.
* Used to facilitate debugging and profiling of JavaScript code written
Expand Down
10 changes: 9 additions & 1 deletion v8_c_api/src/v8include/v8-initialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,17 @@ class V8_EXPORT V8 {
* is created. It always returns true.
*/
V8_INLINE static bool Initialize() {
#ifdef V8_TARGET_OS_ANDROID
const bool kV8TargetOsIsAndroid = true;
#else
const bool kV8TargetOsIsAndroid = false;
#endif

const int kBuildConfiguration =
(internal::PointerCompressionIsEnabled() ? kPointerCompression : 0) |
(internal::SmiValuesAre31Bits() ? k31BitSmis : 0) |
(internal::SandboxIsEnabled() ? kSandbox : 0);
(internal::SandboxIsEnabled() ? kSandbox : 0) |
(kV8TargetOsIsAndroid ? kTargetOsIsAndroid : 0);
return Initialize(kBuildConfiguration);
}

Expand Down Expand Up @@ -271,6 +278,7 @@ class V8_EXPORT V8 {
kPointerCompression = 1 << 0,
k31BitSmis = 1 << 1,
kSandbox = 1 << 2,
kTargetOsIsAndroid = 1 << 3,
};

/**
Expand Down
Loading

0 comments on commit 1d81f77

Please sign in to comment.