chore: update patches/common/v8

This commit is contained in:
deepak1556 2019-02-14 22:02:03 +05:30 committed by Samuel Attard
parent 9bc3888378
commit a3deae4491
11 changed files with 54 additions and 84 deletions

View file

@ -7,4 +7,3 @@ build-torque-with-x64-toolchain-on-arm.patch
do_not_run_arm_arm64_mksnapshot_binaries.patch do_not_run_arm_arm64_mksnapshot_binaries.patch
deps_provide_more_v8_backwards_compatibility.patch deps_provide_more_v8_backwards_compatibility.patch
dcheck.patch dcheck.patch
expose_protected_v8_platform_systemclocktimemillis.patch

View file

@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side. Realloc on the v8 side.
diff --git a/include/v8.h b/include/v8.h diff --git a/include/v8.h b/include/v8.h
index b23114f4ff8bfadffb35df4d92a832a2320c718e..fc20cf50c3a6dc66c37b8b46d06db7a2f0f558ce 100644 index dac45b4a645af14bf8cbfb0eb7e662e3fb62c089..da8beb3a50cd766fa77cab2396ed9ce889614b85 100644
--- a/include/v8.h --- a/include/v8.h
+++ b/include/v8.h +++ b/include/v8.h
@@ -4610,6 +4610,13 @@ class V8_EXPORT ArrayBuffer : public Object { @@ -4694,6 +4694,13 @@ class V8_EXPORT ArrayBuffer : public Object {
*/ */
virtual void* AllocateUninitialized(size_t length) = 0; virtual void* AllocateUninitialized(size_t length) = 0;
@ -30,10 +30,10 @@ index b23114f4ff8bfadffb35df4d92a832a2320c718e..fc20cf50c3a6dc66c37b8b46d06db7a2
* Free the memory block of size |length|, pointed to by |data|. * Free the memory block of size |length|, pointed to by |data|.
* That memory is guaranteed to be previously allocated by |Allocate|. * That memory is guaranteed to be previously allocated by |Allocate|.
diff --git a/src/api.cc b/src/api.cc diff --git a/src/api.cc b/src/api.cc
index b1f9c99860f2847f92b4d9e97fe126e4ae23cb20..59527269d2dec81e02089ebc926e74893ea7827f 100644 index 8e2c85677abfb36ba9ab2c4a689f938130ec5335..f9c3f9e55525119359f7d2a1f0978e7acf302775 100644
--- a/src/api.cc --- a/src/api.cc
+++ b/src/api.cc +++ b/src/api.cc
@@ -512,6 +512,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { @@ -515,6 +515,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
i::V8::SetSnapshotBlob(snapshot_blob); i::V8::SetSnapshotBlob(snapshot_blob);
} }

View file

@ -5,10 +5,10 @@ Subject: array_buffer.patch
diff --git a/include/v8.h b/include/v8.h diff --git a/include/v8.h b/include/v8.h
index fc20cf50c3a6dc66c37b8b46d06db7a2f0f558ce..f23567c1429ae0bbc5f916e4ee0a1190dae8d88f 100644 index da8beb3a50cd766fa77cab2396ed9ce889614b85..16a17739e5396dc7db5b5f483b2fe34cc4afbd39 100644
--- a/include/v8.h --- a/include/v8.h
+++ b/include/v8.h +++ b/include/v8.h
@@ -7707,6 +7707,9 @@ class V8_EXPORT Isolate { @@ -7825,6 +7825,9 @@ class V8_EXPORT Isolate {
*/ */
void SetIdle(bool is_idle); void SetIdle(bool is_idle);
@ -19,10 +19,10 @@ index fc20cf50c3a6dc66c37b8b46d06db7a2f0f558ce..f23567c1429ae0bbc5f916e4ee0a1190
bool InContext(); bool InContext();
diff --git a/src/api.cc b/src/api.cc diff --git a/src/api.cc b/src/api.cc
index 59527269d2dec81e02089ebc926e74893ea7827f..4000a95a2e52aad0e9f6110a5c53c5ea1db82645 100644 index f9c3f9e55525119359f7d2a1f0978e7acf302775..b2efe0ee52ca548a5d8d25555c4a6119422efd71 100644
--- a/src/api.cc --- a/src/api.cc
+++ b/src/api.cc +++ b/src/api.cc
@@ -7966,6 +7966,13 @@ void Isolate::SetIdle(bool is_idle) { @@ -7982,6 +7982,13 @@ void Isolate::SetIdle(bool is_idle) {
isolate->SetIdle(is_idle); isolate->SetIdle(is_idle);
} }

View file

@ -1,16 +1,16 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com> From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 4 Jan 2019 15:50:24 +0530 Date: Thu, 21 Feb 2019 00:06:32 +0530
Subject: build-torque-with-x64-toolchain-on-arm.patch Subject: build-torque-with-x64-toolchain-on-arm.patch
torque binary has to be run during the build. torque binary has to be run during the build.
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
index b70c09aa34aa7547e7d26d9e35795904a17c092f..ff8d1fbeabfd9730df4488981397c810af099d7e 100644 index c08b5cc36ee37599419a08576b7f50fe35da719d..737ca427c8ac595e36aa68ce831db155a9d08e1d 100644
--- a/BUILD.gn --- a/BUILD.gn
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -184,7 +184,9 @@ declare_args() { @@ -178,7 +178,9 @@ declare_args() {
# the snapshot toolchain is the target toolchain and, hence, can't be used.
v8_generator_toolchain = v8_snapshot_toolchain v8_generator_toolchain = v8_snapshot_toolchain
if (host_cpu == "x64" && if (host_cpu == "x64" &&
- (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { - (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) {
@ -20,7 +20,7 @@ index b70c09aa34aa7547e7d26d9e35795904a17c092f..ff8d1fbeabfd9730df4488981397c810
v8_generator_toolchain = "//build/toolchain/linux:clang_x64" v8_generator_toolchain = "//build/toolchain/linux:clang_x64"
} }
@@ -3402,7 +3404,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { @@ -3487,7 +3489,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
} }
} }

View file

@ -5,19 +5,19 @@ Subject: build_gn.patch
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
index 16e0b60ca784417321871cb2e192b74fba3b3131..ee2607fad94220c6390b129ee2f069775b00a5d2 100644 index 8e96a8cf47b6549c014ea654998d32edd9000fc4..54528b4b419d52928bac3cab1c9f26f139035512 100644
--- a/BUILD.gn --- a/BUILD.gn
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -236,7 +236,7 @@ config("internal_config") { @@ -240,7 +240,7 @@ config("internal_config") {
":v8_header_features",
configs = [ "//build/config/compiler:wexit_time_destructors" ] ]
- if (is_component_build) { - if (is_component_build) {
+ if (is_component_build || is_electron_build) { + if (is_component_build || is_electron_build) {
defines = [ "BUILDING_V8_SHARED" ] defines += [ "BUILDING_V8_SHARED" ]
} }
} }
@@ -3387,6 +3387,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { @@ -3462,6 +3462,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ] configs = [ ":internal_config" ]

View file

@ -5,10 +5,10 @@ Subject: dcheck.patch
diff --git a/src/api.cc b/src/api.cc diff --git a/src/api.cc b/src/api.cc
index ed4113a3381fcfc83463a866a34b0fd071cc2650..7c409499a83e2f7d3dd552c2b91f77de62adfea0 100644 index ebbcadedd7dd1f139185d264bcd3bb41ba368696..2ac18fc9327144d15e19546ee2a9075bed55b59e 100644
--- a/src/api.cc --- a/src/api.cc
+++ b/src/api.cc +++ b/src/api.cc
@@ -8611,7 +8611,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { @@ -8626,7 +8626,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
void Isolate::RunMicrotasks() { void Isolate::RunMicrotasks() {
@ -18,10 +18,10 @@ index ed4113a3381fcfc83463a866a34b0fd071cc2650..7c409499a83e2f7d3dd552c2b91f77de
isolate->default_microtask_queue()->RunMicrotasks(isolate); isolate->default_microtask_queue()->RunMicrotasks(isolate);
} }
diff --git a/src/heap/heap.cc b/src/heap/heap.cc diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index d399d070b84b948840de84a92c64e366e5aa42bb..413e18d9cdf6c947c86752a86473d095cc29c011 100644 index 6550716be13b07a1bfff45c4df0faa4a85eaf360..e0574edfb12538fa636bbfd1335c2d667fd01cb5 100644
--- a/src/heap/heap.cc --- a/src/heap/heap.cc
+++ b/src/heap/heap.cc +++ b/src/heap/heap.cc
@@ -4773,9 +4773,9 @@ void Heap::TearDown() { @@ -4827,9 +4827,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) { GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback); DCHECK_NOT_NULL(callback);

View file

@ -20,10 +20,10 @@ Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
diff --git a/src/flag-definitions.h b/src/flag-definitions.h diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index d262fb70129fe93cab35fffbca01f38dac461a30..deec6d034505ca531db6acc711bce7bff62190b3 100644 index 166e689a421ca9e055fbe9ea20eb6fea707b2ca2..b81f6f18e9feb63fa5b548b5de5827baff349e1c 100644
--- a/src/flag-definitions.h --- a/src/flag-definitions.h
+++ b/src/flag-definitions.h +++ b/src/flag-definitions.h
@@ -1290,7 +1290,7 @@ DEFINE_BOOL(log_function_events, false, @@ -1307,7 +1307,7 @@ DEFINE_BOOL(log_function_events, false,
DEFINE_BOOL(prof, false, DEFINE_BOOL(prof, false,
"Log statistical profiling information (implies --log-code).") "Log statistical profiling information (implies --log-code).")

View file

@ -22,10 +22,10 @@ Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
diff --git a/include/v8.h b/include/v8.h diff --git a/include/v8.h b/include/v8.h
index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b85294e9ffae 100644 index 16a17739e5396dc7db5b5f483b2fe34cc4afbd39..ccbf36c0cb69bdfc0c459eb182bd42beffdbe056 100644
--- a/include/v8.h --- a/include/v8.h
+++ b/include/v8.h +++ b/include/v8.h
@@ -996,6 +996,10 @@ class V8_EXPORT PrimitiveArray { @@ -1143,6 +1143,10 @@ class V8_EXPORT PrimitiveArray {
public: public:
static Local<PrimitiveArray> New(Isolate* isolate, int length); static Local<PrimitiveArray> New(Isolate* isolate, int length);
int Length() const; int Length() const;
@ -36,7 +36,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
void Set(Isolate* isolate, int index, Local<Primitive> item); void Set(Isolate* isolate, int index, Local<Primitive> item);
Local<Primitive> Get(Isolate* isolate, int index); Local<Primitive> Get(Isolate* isolate, int index);
}; };
@@ -1699,6 +1703,8 @@ class V8_EXPORT StackTrace { @@ -1846,6 +1850,8 @@ class V8_EXPORT StackTrace {
/** /**
* Returns a StackFrame at a particular index. * Returns a StackFrame at a particular index.
*/ */
@ -45,7 +45,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
Local<StackFrame> GetFrame(Isolate* isolate, uint32_t index) const; Local<StackFrame> GetFrame(Isolate* isolate, uint32_t index) const;
/** /**
@@ -2407,6 +2413,13 @@ class V8_EXPORT Value : public Data { @@ -2546,6 +2552,13 @@ class V8_EXPORT Value : public Data {
V8_DEPRECATE_SOON("Use maybe version", V8_DEPRECATE_SOON("Use maybe version",
Local<Int32> ToInt32(Isolate* isolate) const); Local<Int32> ToInt32(Isolate* isolate) const);
@ -59,7 +59,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
/** /**
* Attempts to convert a string to an array index. * Attempts to convert a string to an array index.
* Returns an empty handle if the conversion fails. * Returns an empty handle if the conversion fails.
@@ -2426,7 +2439,14 @@ class V8_EXPORT Value : public Data { @@ -2565,7 +2578,14 @@ class V8_EXPORT Value : public Data {
Local<Context> context) const; Local<Context> context) const;
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const; V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
@ -74,7 +74,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context, V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
Local<Value> that) const; Local<Value> that) const;
bool StrictEquals(Local<Value> that) const; bool StrictEquals(Local<Value> that) const;
@@ -2533,6 +2553,8 @@ class V8_EXPORT String : public Name { @@ -2672,6 +2692,8 @@ class V8_EXPORT String : public Name {
* Returns the number of bytes in the UTF-8 encoded * Returns the number of bytes in the UTF-8 encoded
* representation of this string. * representation of this string.
*/ */
@ -83,7 +83,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
int Utf8Length(Isolate* isolate) const; int Utf8Length(Isolate* isolate) const;
/** /**
@@ -2589,12 +2611,23 @@ class V8_EXPORT String : public Name { @@ -2728,12 +2750,23 @@ class V8_EXPORT String : public Name {
// 16-bit character codes. // 16-bit character codes.
int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1, int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1,
int options = NO_OPTIONS) const; int options = NO_OPTIONS) const;
@ -107,7 +107,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
/** /**
* A zero length string. * A zero length string.
@@ -2786,6 +2819,9 @@ class V8_EXPORT String : public Name { @@ -2921,6 +2954,9 @@ class V8_EXPORT String : public Name {
*/ */
static Local<String> Concat(Isolate* isolate, Local<String> left, static Local<String> Concat(Isolate* isolate, Local<String> left,
Local<String> right); Local<String> right);
@ -117,7 +117,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
/** /**
* Creates a new external string using the data defined in the given * Creates a new external string using the data defined in the given
@@ -2854,6 +2890,8 @@ class V8_EXPORT String : public Name { @@ -2989,6 +3025,8 @@ class V8_EXPORT String : public Name {
*/ */
class V8_EXPORT Utf8Value { class V8_EXPORT Utf8Value {
public: public:
@ -126,7 +126,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
Utf8Value(Isolate* isolate, Local<v8::Value> obj); Utf8Value(Isolate* isolate, Local<v8::Value> obj);
~Utf8Value(); ~Utf8Value();
char* operator*() { return str_; } char* operator*() { return str_; }
@@ -2877,6 +2915,7 @@ class V8_EXPORT String : public Name { @@ -3012,6 +3050,7 @@ class V8_EXPORT String : public Name {
*/ */
class V8_EXPORT Value { class V8_EXPORT Value {
public: public:
@ -134,7 +134,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
Value(Isolate* isolate, Local<v8::Value> obj); Value(Isolate* isolate, Local<v8::Value> obj);
~Value(); ~Value();
uint16_t* operator*() { return str_; } uint16_t* operator*() { return str_; }
@@ -5271,6 +5310,8 @@ class V8_EXPORT BooleanObject : public Object { @@ -5383,6 +5422,8 @@ class V8_EXPORT BooleanObject : public Object {
class V8_EXPORT StringObject : public Object { class V8_EXPORT StringObject : public Object {
public: public:
static Local<Value> New(Isolate* isolate, Local<String> value); static Local<Value> New(Isolate* isolate, Local<String> value);
@ -143,7 +143,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
Local<String> ValueOf() const; Local<String> ValueOf() const;
@@ -10127,6 +10168,30 @@ template <class T> Value* Value::Cast(T* value) { @@ -10367,6 +10408,30 @@ template <class T> Value* Value::Cast(T* value) {
} }
@ -175,10 +175,10 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
diff --git a/src/api.cc b/src/api.cc diff --git a/src/api.cc b/src/api.cc
index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd071cc2650 100644 index b2efe0ee52ca548a5d8d25555c4a6119422efd71..ebbcadedd7dd1f139185d264bcd3bb41ba368696 100644
--- a/src/api.cc --- a/src/api.cc
+++ b/src/api.cc +++ b/src/api.cc
@@ -2181,6 +2181,10 @@ int PrimitiveArray::Length() const { @@ -2229,6 +2229,10 @@ int PrimitiveArray::Length() const {
return array->length(); return array->length();
} }
@ -189,7 +189,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
void PrimitiveArray::Set(Isolate* v8_isolate, int index, void PrimitiveArray::Set(Isolate* v8_isolate, int index,
Local<Primitive> item) { Local<Primitive> item) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -2194,6 +2198,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index, @@ -2242,6 +2246,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
array->set(index, *i_item); array->set(index, *i_item);
} }
@ -200,7 +200,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
Local<Primitive> PrimitiveArray::Get(Isolate* v8_isolate, int index) { Local<Primitive> PrimitiveArray::Get(Isolate* v8_isolate, int index) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
i::Handle<i::FixedArray> array = Utils::OpenHandle(this); i::Handle<i::FixedArray> array = Utils::OpenHandle(this);
@@ -2899,6 +2907,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) { @@ -2947,6 +2955,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
// --- S t a c k T r a c e --- // --- S t a c k T r a c e ---
@ -211,7 +211,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate, Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate,
uint32_t index) const { uint32_t index) const {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -3858,6 +3870,36 @@ void v8::RegExp::CheckCast(v8::Value* that) { @@ -3911,6 +3923,36 @@ void v8::RegExp::CheckCast(v8::Value* that) {
} }
@ -248,7 +248,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
Maybe<bool> Value::BooleanValue(Local<Context> context) const { Maybe<bool> Value::BooleanValue(Local<Context> context) const {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
return Just(Utils::OpenHandle(this)->BooleanValue(isolate)); return Just(Utils::OpenHandle(this)->BooleanValue(isolate));
@@ -3946,6 +3988,12 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const { @@ -3999,6 +4041,12 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
} }
@ -261,7 +261,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const { Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const {
i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate(); i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
auto self = Utils::OpenHandle(this); auto self = Utils::OpenHandle(this);
@@ -5269,6 +5317,10 @@ bool String::ContainsOnlyOneByte() const { @@ -5277,6 +5325,10 @@ bool String::ContainsOnlyOneByte() const {
return helper.Check(*str); return helper.Check(*str);
} }
@ -272,7 +272,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
int String::Utf8Length(Isolate* isolate) const { int String::Utf8Length(Isolate* isolate) const {
i::Handle<i::String> str = Utils::OpenHandle(this); i::Handle<i::String> str = Utils::OpenHandle(this);
str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str); str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
@@ -5421,6 +5473,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start, @@ -5429,6 +5481,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
} }
} // anonymous namespace } // anonymous namespace
@ -287,7 +287,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity, int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity,
int* nchars_ref, int options) const { int* nchars_ref, int options) const {
i::Handle<i::String> str = Utils::OpenHandle(this); i::Handle<i::String> str = Utils::OpenHandle(this);
@@ -5461,6 +5521,18 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string, @@ -5469,6 +5529,18 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
} }
@ -306,7 +306,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start, int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
int length, int options) const { int length, int options) const {
return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer, return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
@@ -6430,6 +6502,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate, @@ -6418,6 +6490,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
return result; return result;
} }
@ -318,7 +318,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left, Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
Local<String> right) { Local<String> right) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -6713,6 +6790,11 @@ bool v8::BooleanObject::ValueOf() const { @@ -6701,6 +6778,11 @@ bool v8::BooleanObject::ValueOf() const {
} }
@ -330,7 +330,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate, Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate,
Local<String> value) { Local<String> value) {
i::Handle<i::String> string = Utils::OpenHandle(*value); i::Handle<i::String> string = Utils::OpenHandle(*value);
@@ -8925,6 +9007,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) { @@ -8933,6 +9015,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) {
return isolate->default_microtask_queue()->IsRunningMicrotasks(); return isolate->default_microtask_queue()->IsRunningMicrotasks();
} }
@ -340,7 +340,7 @@ index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd0
String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj) String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
: str_(nullptr), length_(0) { : str_(nullptr), length_(0) {
if (obj.IsEmpty()) return; if (obj.IsEmpty()) return;
@@ -8944,6 +9029,9 @@ String::Utf8Value::~Utf8Value() { @@ -8952,6 +9037,9 @@ String::Utf8Value::~Utf8Value() {
i::DeleteArray(str_); i::DeleteArray(str_);
} }

View file

@ -10,10 +10,10 @@ Electron does, so this patch makes sure that the build doesn't try to run
the mksnapshot binary if it was built for arm or arm64. the mksnapshot binary if it was built for arm or arm64.
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
index ff8d1fbeabfd9730df4488981397c810af099d7e..465247a682cc1012d77c28c731fe1553565f128f 100644 index 7160d238f2f703bd1dac731d868120fb1f5aad9f..c08b5cc36ee37599419a08576b7f50fe35da719d 100644
--- a/BUILD.gn --- a/BUILD.gn
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -1242,9 +1242,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) { @@ -1299,9 +1299,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) {
] ]
public_deps = [ public_deps = [
":natives_blob", ":natives_blob",

View file

@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to build mksnapshot on arm. Needed in order to build mksnapshot on arm.
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
index ee2607fad94220c6390b129ee2f069775b00a5d2..b70c09aa34aa7547e7d26d9e35795904a17c092f 100644 index 54528b4b419d52928bac3cab1c9f26f139035512..7160d238f2f703bd1dac731d868120fb1f5aad9f 100644
--- a/BUILD.gn --- a/BUILD.gn
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -3377,8 +3377,6 @@ if (current_toolchain == v8_generator_toolchain) { @@ -3452,8 +3452,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") { v8_executable("mksnapshot") {

View file

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Yang Guo <yangguo@chromium.org>
Date: Wed, 6 Feb 2019 15:40:15 +0100
Subject: Expose protected v8::Platform::SystemClockTimeMillis
This allows the embedder to use a shared library build
even if they use this method.
R=ulan@chromium.org
Change-Id: I613a6e5eb82b494128fb95dc89a0b73639ac5ca2
Reviewed-on: https://chromium-review.googlesource.com/c/1456042
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59455}
diff --git a/include/v8-platform.h b/include/v8-platform.h
index fc008979f69210d5e627ea735146f66c36703f43..ece562f4338f5489ae6c457afc4fde4034abf21a 100644
--- a/include/v8-platform.h
+++ b/include/v8-platform.h
@@ -430,7 +430,7 @@ class Platform {
* since epoch. Useful for implementing |CurrentClockTimeMillis| if
* nothing special needed.
*/
- static double SystemClockTimeMillis();
+ V8_EXPORT static double SystemClockTimeMillis();
};
} // namespace v8