Skip to content

Commit d0a1b24

Browse files
author
Vasil Hristov
authored
Merge pull request #1189 from NativeScript/master
RC
2 parents c8679c3 + d6ff22f commit d0a1b24

File tree

105 files changed

+4686
-6353
lines changed

Some content is hidden

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

105 files changed

+4686
-6353
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
==
33

44
## What's New
5-
- [Upgrade v8 to 6.9.427.23(#1168)](https://github.com/NativeScript/android-runtime/issues/1168)
65
- [Added support for before-plugins.gradle file applied before plugin(#1183)](https://github.com/NativeScript/android-runtime/pull/1185)
76
- [Make JSParser in SBG fail the build when failing(#1152)](https://github.com/NativeScript/android-runtime/issues/1152)
87
- [Generate interface names list in SBG in parallel(#1132)](https://github.com/NativeScript/android-runtime/issues/1132)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"v8Version": "6.9.427.23"
2+
"v8Version": "6.7.288.46"
33
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"**/*"
1111
],
1212
"gradle": {
13-
"version": "4.4",
14-
"android": "3.1.4"
13+
"version": "4.10.2",
14+
"android": "3.2.0"
1515
}
1616
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

test-app/runtime/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ MESSAGE( STATUS "# CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} )
179179
# linking v8 and inspector libraries to runtime(NativeScript library)
180180
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libzip.a )
181181
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_base.a )
182-
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_snapshot.a )
183182
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_init.a )
184183
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_initializers.a )
185184
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libplatform.a )
186185
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libsampler.a )
187186
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libbase.a )
187+
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_snapshot.a )
188188

189189
# Command info: https://cmake.org/cmake/help/v3.4/command/find_library.html
190190
# Searches for a specified prebuilt library and stores the path as a
@@ -195,6 +195,7 @@ target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROI
195195
find_library( system-log log )
196196
find_library( system-android android )
197197
find_library( system-dl dl )
198+
find_library( system-atomic atomic ) # TODO: plamen5kov: can't be found in ndk for some reasong ... look at it later (maybe deprecated in newer NDK versions)
198199
find_library( system-z z )
199200

200201
# Command info: https://cmake.org/cmake/help/v3.4/command/target_link_libraries.html

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ void ObjectManager::MarkReachableObjects(Isolate* isolate, const Local<Object>&
482482
}
483483

484484
auto o = top.As<Object>();
485-
if (!isInFirstRun) {
486-
unsigned long addr = NativeScriptExtension::GetAddress(o);
485+
if(!isInFirstRun) {
486+
uint8_t* addr = NativeScriptExtension::GetAddress(o);
487487
auto itFound = m_visited.find(addr);
488488
if (itFound != m_visited.end()) {
489489
continue;

test-app/runtime/src/main/cpp/ObjectManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class ObjectManager {
201201

202202
PersistentObjectIdSet m_released;
203203

204-
std::set<unsigned long> m_visited;
204+
std::set<uint8_t*> m_visited;
205205

206206
LRUCache<int, jweak> m_cache;
207207

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ void Profiler::StopCPUProfilerCallbackImpl(const v8::FunctionCallbackInfo<v8::Va
8282
}
8383

8484
void Profiler::StartCPUProfiler(Isolate* isolate, const Local<String>& name) {
85-
auto v8prof = CpuProfiler::New(isolate);
85+
auto v8prof = isolate->GetCpuProfiler();
8686
v8prof->StartProfiling(name, true);
8787
}
8888

8989
bool Profiler::StopCPUProfiler(Isolate* isolate, const Local<String>& name) {
90-
auto v8prof = CpuProfiler::New(isolate);
90+
auto v8prof = isolate->GetCpuProfiler();
9191
auto cpuProfile = v8prof->StopProfiling(name);
9292

9393
auto success = false;

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
#include "v8.h"
22

33
namespace v8 {
4+
5+
class NativeScriptExtension {
6+
public:
7+
static uint8_t* GetAddress(const v8::Local<v8::Object>& obj);
48

5-
class NativeScriptExtension {
6-
public:
7-
static unsigned long GetAddress(const v8::Local<v8::Object>& obj);
9+
static v8::Local<v8::Value>* GetClosureObjects(v8::Isolate *isolate, const v8::Local<v8::Function>& func, int *length);
810

9-
static v8::Local<v8::Value>* GetClosureObjects(v8::Isolate* isolate, const v8::Local<v8::Function>& func, int* length);
11+
static void ReleaseClosureObjects(v8::Local<v8::Value>* closureObjects);
12+
13+
static void GetAssessorPair(v8::Isolate *isolate, const v8::Local<v8::Object>& obj, const v8::Local<v8::String>& propName, v8::Local<v8::Value>& getter, v8::Local<v8::Value>& setter);
1014

11-
static void ReleaseClosureObjects(v8::Local<v8::Value>* closureObjects);
15+
static v8::Local<v8::Array> GetPropertyKeys(v8::Isolate *isolate, const v8::Local<v8::Context>& context, const v8::Local<v8::Object>& object, bool& success);
1216

13-
static void GetAssessorPair(v8::Isolate* isolate, const v8::Local<v8::Object>& obj, const v8::Local<v8::String>& propName, v8::Local<v8::Value>& getter, v8::Local<v8::Value>& setter);
17+
static void CpuFeaturesProbe(bool cross_compile);
18+
private:
19+
NativeScriptExtension();
1420

15-
static v8::Local<v8::Array> GetPropertyKeys(v8::Isolate* isolate, const v8::Local<v8::Context>& context, const v8::Local<v8::Object>& object, bool& success);
16-
17-
static void CpuFeaturesProbe(bool cross_compile);
18-
private:
19-
NativeScriptExtension();
20-
};
21+
// static v8::internal::Handle<v8::internal::FixedArray> GetEnumPropertyKeys(const v8::internal::Handle<v8::internal::JSObject>& object, bool cache_result);
22+
};
2123
}
22-

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ V8_PLATFORM_EXPORT bool PumpMessageLoop(
6262
v8::Platform* platform, v8::Isolate* isolate,
6363
MessageLoopBehavior behavior = MessageLoopBehavior::kDoNotWait);
6464

65-
V8_PLATFORM_EXPORT V8_DEPRECATED(
65+
V8_PLATFORM_EXPORT V8_DEPRECATE_SOON(
6666
"This function has become obsolete and is essentially a nop",
6767
void EnsureEventLoopInitialized(v8::Platform* platform,
6868
v8::Isolate* isolate));

0 commit comments

Comments
 (0)