Skip to content

Commit d823f4e

Browse files
author
Vasil Hristov
authored
Merge pull request #1556 from NativeScript/darind/v8-7.9.317.31
feat: Updated V8 to 7.9.317.31 (#1555)
2 parents 6bd3ba9 + 4b74264 commit d823f4e

File tree

85 files changed

+57831
-59806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+57831
-59806
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
6.4.0
2+
==
3+
4+
## What's New
5+
6+
- [Upgrade v8 to 7.9.317.31 (#1526)](https://github.com/NativeScript/android-runtime/issues/1555)
7+
18
6.3.0
29
==
310

@@ -24,7 +31,7 @@
2431
- [Upgrade android gradle plugin to the latest 3.5.1 version (#1502)](https://github.com/NativeScript/android-runtime/issues/1502)
2532
- [support snapshot libs out of the box (#1496)](https://github.com/NativeScript/android-runtime/pull/1496)
2633
- [Upgrade v8 to 7.7.299.11 (#1478)](https://github.com/NativeScript/android-runtime/issues/1478)
27-
34+
2835
## Bug Fixes
2936
- [Console.log in worker makes chrome debugging crash (#1511)](https://github.com/NativeScript/android-runtime/issues/1511)
3037
- [fix searching for merge assets folder on windows (#1503)](https://github.com/NativeScript/android-runtime/pull/1503)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"v8Version": "7.8.279.19",
2+
"v8Version": "7.9.317.31",
33
"ndkRevision": "20.0.5594570",
44
"mksnapshotParams": "--profile_deserialization --turbo_instruction_scheduling --target_os=android --no-native-code-counters"
55
}

test-app/runtime/src/main/cpp/Runtime.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "NetworkDomainCallbackHandlers.h"
2929
#include "sys/system_properties.h"
3030
#include "ManualInstrumentation.h"
31-
#include <natives_blob.h>
3231
#include <snapshot_blob.h>
3332

3433
#ifdef APPLICATION_IN_DEBUG
@@ -472,11 +471,6 @@ Isolate* Runtime::PrepareV8Runtime(const string& filesPath, const string& native
472471

473472
m_startupData = new StartupData();
474473

475-
auto* nativesBlobStartupData = new StartupData();
476-
nativesBlobStartupData->data = reinterpret_cast<const char*>(&natives_blob_bin[0]);
477-
nativesBlobStartupData->raw_size = natives_blob_bin_len;
478-
V8::SetNativesDataBlob(nativesBlobStartupData);
479-
480474
void* snapshotPtr = nullptr;
481475
string snapshotPath;
482476
bool snapshotPathExists = false;

test-app/runtime/src/main/cpp/include/libplatform/libplatform.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef V8_LIBPLATFORM_LIBPLATFORM_H_
66
#define V8_LIBPLATFORM_LIBPLATFORM_H_
77

8+
#include <memory>
9+
810
#include "libplatform/libplatform-export.h"
911
#include "libplatform/v8-tracing.h"
1012
#include "v8-platform.h" // NOLINT(build/include)
@@ -70,11 +72,10 @@ V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform* platform,
7072
* The |platform| has to be created using |NewDefaultPlatform|.
7173
*
7274
*/
73-
V8_PLATFORM_EXPORT V8_DEPRECATE_SOON(
74-
"Access the DefaultPlatform directly",
75-
void SetTracingController(
76-
v8::Platform* platform,
77-
v8::platform::tracing::TracingController* tracing_controller));
75+
V8_DEPRECATE_SOON("Access the DefaultPlatform directly")
76+
V8_PLATFORM_EXPORT void SetTracingController(
77+
v8::Platform* platform,
78+
v8::platform::tracing::TracingController* tracing_controller);
7879

7980
} // namespace platform
8081
} // namespace v8

test-app/runtime/src/main/cpp/include/v8-inspector.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace Runtime {
2424
namespace API {
2525
class RemoteObject;
2626
class StackTrace;
27+
class StackTraceId;
2728
}
2829
}
2930
namespace Schema {
@@ -229,12 +230,20 @@ class V8_EXPORT V8InspectorClient {
229230
struct V8_EXPORT V8StackTraceId {
230231
uintptr_t id;
231232
std::pair<int64_t, int64_t> debugger_id;
233+
bool should_pause = false;
232234

233235
V8StackTraceId();
236+
V8StackTraceId(const V8StackTraceId&) = default;
234237
V8StackTraceId(uintptr_t id, const std::pair<int64_t, int64_t> debugger_id);
238+
V8StackTraceId(uintptr_t id, const std::pair<int64_t, int64_t> debugger_id,
239+
bool should_pause);
240+
explicit V8StackTraceId(const StringView&);
241+
V8StackTraceId& operator=(const V8StackTraceId&) = default;
242+
V8StackTraceId& operator=(V8StackTraceId&&) noexcept = default;
235243
~V8StackTraceId() = default;
236244

237245
bool IsInvalid() const;
246+
std::unique_ptr<StringBuffer> ToString();
238247
};
239248

240249
class V8_EXPORT V8Inspector {

test-app/runtime/src/main/cpp/include/v8-internal.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ using PlatformSmiTagging = SmiTagging<kApiInt32Size>;
112112
using PlatformSmiTagging = SmiTagging<kApiTaggedSize>;
113113
#endif
114114

115+
// TODO(ishell): Consinder adding kSmiShiftBits = kSmiShiftSize + kSmiTagSize
116+
// since it's used much more often than the inividual constants.
115117
const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize;
116118
const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize;
117119
const int kSmiMinValue = static_cast<int>(PlatformSmiTagging::kSmiMinValue);
@@ -327,14 +329,11 @@ class Internals {
327329
#ifdef V8_COMPRESS_POINTERS
328330
// See v8:7703 or src/ptr-compr.* for details about pointer compression.
329331
static constexpr size_t kPtrComprHeapReservationSize = size_t{1} << 32;
330-
static constexpr size_t kPtrComprIsolateRootBias =
331-
kPtrComprHeapReservationSize / 2;
332332
static constexpr size_t kPtrComprIsolateRootAlignment = size_t{1} << 32;
333333

334334
V8_INLINE static internal::Address GetRootFromOnHeapAddress(
335335
internal::Address addr) {
336-
return (addr + kPtrComprIsolateRootBias) &
337-
-static_cast<intptr_t>(kPtrComprIsolateRootAlignment);
336+
return addr & -static_cast<intptr_t>(kPtrComprIsolateRootAlignment);
338337
}
339338

340339
V8_INLINE static internal::Address DecompressTaggedAnyField(
@@ -381,6 +380,10 @@ V8_EXPORT internal::Isolate* IsolateFromNeverReadOnlySpaceObject(Address obj);
381380
// language mode is strict.
382381
V8_EXPORT bool ShouldThrowOnError(v8::internal::Isolate* isolate);
383382

383+
// A base class for backing stores, which is needed due to vagaries of
384+
// how static casts work with std::shared_ptr.
385+
class BackingStoreBase {};
386+
384387
} // namespace internal
385388
} // namespace v8
386389

test-app/runtime/src/main/cpp/include/v8-platform.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -367,20 +367,18 @@ class Platform {
367367
* |isolate|. Tasks posted for the same isolate should be execute in order of
368368
* scheduling. The definition of "foreground" is opaque to V8.
369369
*/
370-
V8_DEPRECATE_SOON(
371-
"Use a taskrunner acquired by GetForegroundTaskRunner instead.",
372-
virtual void CallOnForegroundThread(Isolate* isolate, Task* task)) = 0;
370+
V8_DEPRECATED("Use a taskrunner acquired by GetForegroundTaskRunner instead.")
371+
virtual void CallOnForegroundThread(Isolate* isolate, Task* task) = 0;
373372

374373
/**
375374
* Schedules a task to be invoked on a foreground thread wrt a specific
376375
* |isolate| after the given number of seconds |delay_in_seconds|.
377376
* Tasks posted for the same isolate should be execute in order of
378377
* scheduling. The definition of "foreground" is opaque to V8.
379378
*/
380-
V8_DEPRECATE_SOON(
381-
"Use a taskrunner acquired by GetForegroundTaskRunner instead.",
382-
virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task,
383-
double delay_in_seconds)) = 0;
379+
V8_DEPRECATED("Use a taskrunner acquired by GetForegroundTaskRunner instead.")
380+
virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task,
381+
double delay_in_seconds) = 0;
384382

385383
/**
386384
* Schedules a task to be invoked on a foreground thread wrt a specific
@@ -390,10 +388,8 @@ class Platform {
390388
* starved for an arbitrarily long time if no idle time is available.
391389
* The definition of "foreground" is opaque to V8.
392390
*/
393-
V8_DEPRECATE_SOON(
394-
"Use a taskrunner acquired by GetForegroundTaskRunner instead.",
395-
virtual void CallIdleOnForegroundThread(Isolate* isolate,
396-
IdleTask* task)) {
391+
V8_DEPRECATED("Use a taskrunner acquired by GetForegroundTaskRunner instead.")
392+
virtual void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) {
397393
// This must be overriden if |IdleTasksEnabled()|.
398394
abort();
399395
}

test-app/runtime/src/main/cpp/include/v8-profiler.h

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
#define V8_V8_PROFILER_H_
77

88
#include <limits.h>
9+
#include <memory>
910
#include <unordered_set>
1011
#include <vector>
12+
1113
#include "v8.h" // NOLINT(build/include)
1214

1315
/**
@@ -143,9 +145,8 @@ class V8_EXPORT CpuProfileNode {
143145
unsigned GetHitCount() const;
144146

145147
/** Returns function entry UID. */
146-
V8_DEPRECATE_SOON(
147-
"Use GetScriptId, GetLineNumber, and GetColumnNumber instead.",
148-
unsigned GetCallUid() const);
148+
V8_DEPRECATED("Use GetScriptId, GetLineNumber, and GetColumnNumber instead.")
149+
unsigned GetCallUid() const;
149150

150151
/** Returns id of the node. The id is unique within the tree */
151152
unsigned GetNodeId() const;
@@ -370,20 +371,6 @@ class V8_EXPORT CpuProfiler {
370371
*/
371372
CpuProfile* StopProfiling(Local<String> title);
372373

373-
/**
374-
* Force collection of a sample. Must be called on the VM thread.
375-
* Recording the forced sample does not contribute to the aggregated
376-
* profile statistics.
377-
*/
378-
V8_DEPRECATED("Use static CollectSample(Isolate*) instead.",
379-
void CollectSample());
380-
381-
/**
382-
* Tells the profiler whether the embedder is idle.
383-
*/
384-
V8_DEPRECATED("Use Isolate::SetIdle(bool) instead.",
385-
void SetIdle(bool is_idle));
386-
387374
/**
388375
* Generate more detailed source positions to code objects. This results in
389376
* better results when mapping profiling samples to script source.
@@ -989,7 +976,8 @@ struct HeapStatsUpdate {
989976
V(LazyCompile) \
990977
V(RegExp) \
991978
V(Script) \
992-
V(Stub)
979+
V(Stub) \
980+
V(Relocation)
993981

994982
/**
995983
* Note that this enum may be extended in the future. Please include a default
@@ -1022,10 +1010,12 @@ class V8_EXPORT CodeEvent {
10221010
const char* GetComment();
10231011

10241012
static const char* GetCodeEventTypeName(CodeEventType code_event_type);
1013+
1014+
uintptr_t GetPreviousCodeStartAddress();
10251015
};
10261016

10271017
/**
1028-
* Interface to listen to code creation events.
1018+
* Interface to listen to code creation and code relocation events.
10291019
*/
10301020
class V8_EXPORT CodeEventHandler {
10311021
public:
@@ -1037,9 +1027,26 @@ class V8_EXPORT CodeEventHandler {
10371027
explicit CodeEventHandler(Isolate* isolate);
10381028
virtual ~CodeEventHandler();
10391029

1030+
/**
1031+
* Handle is called every time a code object is created or moved. Information
1032+
* about each code event will be available through the `code_event`
1033+
* parameter.
1034+
*
1035+
* When the CodeEventType is kRelocationType, the code for this CodeEvent has
1036+
* moved from `GetPreviousCodeStartAddress()` to `GetCodeStartAddress()`.
1037+
*/
10401038
virtual void Handle(CodeEvent* code_event) = 0;
10411039

1040+
/**
1041+
* Call `Enable()` to starts listening to code creation and code relocation
1042+
* events. These events will be handled by `Handle()`.
1043+
*/
10421044
void Enable();
1045+
1046+
/**
1047+
* Call `Disable()` to stop listening to code creation and code relocation
1048+
* events.
1049+
*/
10431050
void Disable();
10441051

10451052
private:

test-app/runtime/src/main/cpp/include/v8-version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// NOTE these macros are used by some of the tool scripts and the build
1010
// system so their names cannot be changed without changing the scripts.
1111
#define V8_MAJOR_VERSION 7
12-
#define V8_MINOR_VERSION 8
13-
#define V8_BUILD_NUMBER 279
14-
#define V8_PATCH_LEVEL 19
12+
#define V8_MINOR_VERSION 9
13+
#define V8_BUILD_NUMBER 317
14+
#define V8_PATCH_LEVEL 31
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

0 commit comments

Comments
 (0)