Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade V8 binaries for 11.0.226.13 version #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deps/include/libplatform/v8-tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ class V8_PLATFORM_EXPORT TracingController
const char* name, uint64_t handle) override;

static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag);
#endif // !defined(V8_USE_PERFETTO)

void AddTraceStateObserver(
v8::TracingController::TraceStateObserver* observer) override;
void RemoveTraceStateObserver(
v8::TracingController::TraceStateObserver* observer) override;
#endif // !defined(V8_USE_PERFETTO)

void StartTracing(TraceConfig* trace_config);
void StopTracing();
Expand All @@ -307,7 +307,6 @@ class V8_PLATFORM_EXPORT TracingController
std::unique_ptr<base::Mutex> mutex_;
std::unique_ptr<TraceConfig> trace_config_;
std::atomic_bool recording_{false};
std::unordered_set<v8::TracingController::TraceStateObserver*> observers_;

#if defined(V8_USE_PERFETTO)
std::ostream* output_stream_ = nullptr;
Expand All @@ -316,6 +315,7 @@ class V8_PLATFORM_EXPORT TracingController
TraceEventListener* listener_for_testing_ = nullptr;
std::unique_ptr<perfetto::TracingSession> tracing_session_;
#else // !defined(V8_USE_PERFETTO)
std::unordered_set<v8::TracingController::TraceStateObserver*> observers_;
std::unique_ptr<TraceBuffer> trace_buffer_;
#endif // !defined(V8_USE_PERFETTO)

Expand Down
41 changes: 41 additions & 0 deletions deps/include/v8-array-buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,28 @@ class V8_EXPORT BackingStore : public v8::internal::BackingStoreBase {
*/
size_t ByteLength() const;

/**
* The maximum length (in bytes) that this backing store may grow to.
*
* If this backing store was created for a resizable ArrayBuffer or a growable
* SharedArrayBuffer, it is >= ByteLength(). Otherwise it is ==
* ByteLength().
*/
size_t MaxByteLength() const;

/**
* Indicates whether the backing store was created for an ArrayBuffer or
* a SharedArrayBuffer.
*/
bool IsShared() const;

/**
* Indicates whether the backing store was created for a resizable ArrayBuffer
* or a growable SharedArrayBuffer, and thus may be resized by user JavaScript
* code.
*/
bool IsResizableByUserJavaScript() const;

/**
* Prevent implicit instantiation of operator delete with size_t argument.
* The size_t argument would be incorrect because ptr points to the
Expand Down Expand Up @@ -189,6 +205,11 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
size_t ByteLength() const;

/**
* Maximum length in bytes.
*/
size_t MaxByteLength() const;

/**
* Create a new ArrayBuffer. Allocate |byte_length| bytes.
* Allocated memory will be owned by a created ArrayBuffer and
Expand Down Expand Up @@ -235,6 +256,21 @@ class V8_EXPORT ArrayBuffer : public Object {
void* data, size_t byte_length, v8::BackingStore::DeleterCallback deleter,
void* deleter_data);

/**
* Returns a new resizable standalone BackingStore that is allocated using the
* array buffer allocator of the isolate. The result can be later passed to
* ArrayBuffer::New.
*
* |byte_length| must be <= |max_byte_length|.
*
* This function is usable without an isolate. Unlike |NewBackingStore| calls
* with an isolate, GCs cannot be triggered, and there are no
* retries. Allocation failure will cause the function to crash with an
* out-of-memory error.
*/
static std::unique_ptr<BackingStore> NewResizableBackingStore(
size_t byte_length, size_t max_byte_length);

/**
* Returns true if this ArrayBuffer may be detached.
*/
Expand Down Expand Up @@ -392,6 +428,11 @@ class V8_EXPORT SharedArrayBuffer : public Object {
*/
size_t ByteLength() const;

/**
* Maximum length in bytes.
*/
size_t MaxByteLength() const;

/**
* Create a new SharedArrayBuffer. Allocate |byte_length| bytes.
* Allocated memory will be owned by a created SharedArrayBuffer and
Expand Down
31 changes: 27 additions & 4 deletions deps/include/v8-fast-api-calls.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ class CTypeInfo {
kUint64,
kFloat32,
kFloat64,
kPointer,
kV8Value,
kSeqOneByteString,
kApiObject, // This will be deprecated once all users have
// migrated from v8::ApiObject to v8::Local<v8::Value>.
kAny, // This is added to enable untyped representation of fast
Expand Down Expand Up @@ -379,6 +381,11 @@ struct FastApiArrayBuffer {
size_t byte_length;
};

struct FastOneByteString {
const char* data;
uint32_t length;
};

class V8_EXPORT CFunctionInfo {
public:
// Construct a struct to hold a CFunction's type information.
Expand Down Expand Up @@ -429,6 +436,7 @@ struct AnyCType {
uint64_t uint64_value;
float float_value;
double double_value;
void* pointer_value;
Local<Object> object_value;
Local<Array> sequence_value;
const FastApiTypedArray<uint8_t>* uint8_ta_value;
Expand All @@ -438,6 +446,7 @@ struct AnyCType {
const FastApiTypedArray<uint64_t>* uint64_ta_value;
const FastApiTypedArray<float>* float_ta_value;
const FastApiTypedArray<double>* double_ta_value;
const FastOneByteString* string_value;
FastApiCallbackOptions* options_value;
};
};
Expand Down Expand Up @@ -613,8 +622,9 @@ class CFunctionInfoImpl : public CFunctionInfo {
kReturnType == CTypeInfo::Type::kUint32 ||
kReturnType == CTypeInfo::Type::kFloat32 ||
kReturnType == CTypeInfo::Type::kFloat64 ||
kReturnType == CTypeInfo::Type::kPointer ||
kReturnType == CTypeInfo::Type::kAny,
"64-bit int and api object values are not currently "
"64-bit int, string and api object values are not currently "
"supported return types.");
}

Expand Down Expand Up @@ -651,13 +661,14 @@ struct CTypeInfoTraits {};

#define PRIMITIVE_C_TYPES(V) \
V(bool, kBool) \
V(uint8_t, kUint8) \
V(int32_t, kInt32) \
V(uint32_t, kUint32) \
V(int64_t, kInt64) \
V(uint64_t, kUint64) \
V(float, kFloat32) \
V(double, kFloat64) \
V(uint8_t, kUint8)
V(void*, kPointer)

// Same as above, but includes deprecated types for compatibility.
#define ALL_C_TYPES(V) \
Expand Down Expand Up @@ -691,13 +702,13 @@ PRIMITIVE_C_TYPES(DEFINE_TYPE_INFO_TRAITS)
};

#define TYPED_ARRAY_C_TYPES(V) \
V(uint8_t, kUint8) \
V(int32_t, kInt32) \
V(uint32_t, kUint32) \
V(int64_t, kInt64) \
V(uint64_t, kUint64) \
V(float, kFloat32) \
V(double, kFloat64) \
V(uint8_t, kUint8)
V(double, kFloat64)

TYPED_ARRAY_C_TYPES(SPECIALIZE_GET_TYPE_INFO_HELPER_FOR_TA)

Expand Down Expand Up @@ -735,6 +746,18 @@ struct TypeInfoHelper<FastApiCallbackOptions&> {
}
};

template <>
struct TypeInfoHelper<const FastOneByteString&> {
static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; }

static constexpr CTypeInfo::Type Type() {
return CTypeInfo::Type::kSeqOneByteString;
}
static constexpr CTypeInfo::SequenceType SequenceType() {
return CTypeInfo::SequenceType::kScalar;
}
};

#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG) \
static_assert(((COND) == 0) || (ASSERTION), MSG)

Expand Down
25 changes: 20 additions & 5 deletions deps/include/v8-inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ namespace Debugger {
namespace API {
class SearchMatch;
}
}
} // namespace Debugger
namespace Runtime {
namespace API {
class RemoteObject;
class StackTrace;
class StackTraceId;
}
}
} // namespace API
} // namespace Runtime
namespace Schema {
namespace API {
class Domain;
}
}
} // namespace Schema
} // namespace protocol

class V8_EXPORT StringView {
Expand Down Expand Up @@ -134,6 +134,13 @@ class V8_EXPORT V8DebuggerId {
int64_t m_second = 0;
};

struct V8_EXPORT V8StackFrame {
StringView sourceURL;
StringView functionName;
int lineNumber;
int columnNumber;
};

class V8_EXPORT V8StackTrace {
public:
virtual StringView firstNonEmptySourceURL() const = 0;
Expand All @@ -151,6 +158,8 @@ class V8_EXPORT V8StackTrace {

// Safe to pass between threads, drops async chain.
virtual std::unique_ptr<V8StackTrace> clone() = 0;

virtual std::vector<V8StackFrame> frames() const = 0;
};

class V8_EXPORT V8InspectorSession {
Expand Down Expand Up @@ -203,6 +212,9 @@ class V8_EXPORT V8InspectorSession {
std::unique_ptr<StringBuffer>* objectGroup) = 0;
virtual void releaseObjectGroup(StringView) = 0;
virtual void triggerPreciseCoverageDeltaUpdate(StringView occasion) = 0;

// Prepare for shutdown (disables debugger pausing, etc.).
virtual void stop() = 0;
};

class V8_EXPORT WebDriverValue {
Expand Down Expand Up @@ -365,9 +377,12 @@ class V8_EXPORT V8Inspector {
virtual void flushProtocolNotifications() = 0;
};
enum ClientTrustLevel { kUntrusted, kFullyTrusted };
enum SessionPauseState { kWaitingForDebugger, kNotWaitingForDebugger };
// TODO(chromium:1352175): remove default value once downstream change lands.
virtual std::unique_ptr<V8InspectorSession> connect(
int contextGroupId, Channel*, StringView state,
ClientTrustLevel client_trust_level) {
ClientTrustLevel client_trust_level,
SessionPauseState = kNotWaitingForDebugger) {
return nullptr;
}

Expand Down
Loading