Skip to content
Merged

RC #1192

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
19 changes: 10 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
==

## What's New
- [Added support for before-plugins.gradle file applied before plugin(#1183)](https://github.com/NativeScript/android-runtime/pull/1185)
- [Make JSParser in SBG fail the build when failing(#1152)](https://github.com/NativeScript/android-runtime/issues/1152)
- [Generate interface names list in SBG in parallel(#1132)](https://github.com/NativeScript/android-runtime/issues/1132)
- [Upgrade android gradle plugin to 3.2.0(#1147)](https://github.com/NativeScript/android-runtime/issues/1147)
- [Upgrade v8 to 6.9.427.23(#1168)](https://github.com/NativeScript/android-runtime/issues/1168)
- [Added support for before-plugins.gradle file applied before plugin(#1183)](https://github.com/NativeScript/android-runtime/pull/1185)
- [Make JSParser in SBG fail the build when failing(#1152)](https://github.com/NativeScript/android-runtime/issues/1152)
- [Generate interface names list in SBG in parallel(#1132)](https://github.com/NativeScript/android-runtime/issues/1132)
- [Upgrade android gradle plugin to 3.2.0(#1147)](https://github.com/NativeScript/android-runtime/issues/1147)

## Bug Fixes

Expand All @@ -16,11 +17,11 @@
==

## What's New
- [Upgrade v8 to 6.7.288.46(#1130)](https://github.com/NativeScript/android-runtime/issues/1130)
- [Static binding generator now uses bundled npm packages(#1096)](https://github.com/NativeScript/android-runtime/issues/1096)
- [Add gradle dependencies versions in package.json(#1102)](https://github.com/NativeScript/android-runtime/issues/1102)
- [Introduce a setting for auto catching exceptions when calling JS method native(#1119)](https://github.com/NativeScript/android-runtime/issues/1119)
- [Make livesync work entirely through named sockets(#932)](https://github.com/NativeScript/android-runtime/issues/932)
- [Upgrade v8 to 6.7.288.46(#1130)](https://github.com/NativeScript/android-runtime/issues/1130)
- [Static binding generator now uses bundled npm packages(#1096)](https://github.com/NativeScript/android-runtime/issues/1096)
- [Add gradle dependencies versions in package.json(#1102)](https://github.com/NativeScript/android-runtime/issues/1102)
- [Introduce a setting for auto catching exceptions when calling JS method native(#1119)](https://github.com/NativeScript/android-runtime/issues/1119)
- [Make livesync work entirely through named sockets(#932)](https://github.com/NativeScript/android-runtime/issues/932)

## Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion build-artifacts/project-template-gradle/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"v8Version": "6.7.288.46"
"v8Version": "6.9.427.23"
}
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-arm.so
Binary file not shown.
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-arm64.so
Binary file not shown.
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-x86.so
Binary file not shown.
3 changes: 1 addition & 2 deletions test-app/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ MESSAGE( STATUS "# CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} )
# linking v8 and inspector libraries to runtime(NativeScript library)
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libzip.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_base.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_snapshot.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_init.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_initializers.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libplatform.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libsampler.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libbase.a )
target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_snapshot.a )

# Command info: https://cmake.org/cmake/help/v3.4/command/find_library.html
# Searches for a specified prebuilt library and stores the path as a
Expand All @@ -195,7 +195,6 @@ target_link_libraries( NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROI
find_library( system-log log )
find_library( system-android android )
find_library( system-dl dl )
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)
find_library( system-z z )

# Command info: https://cmake.org/cmake/help/v3.4/command/target_link_libraries.html
Expand Down
4 changes: 2 additions & 2 deletions test-app/runtime/src/main/cpp/ObjectManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ void ObjectManager::MarkReachableObjects(Isolate* isolate, const Local<Object>&
}

auto o = top.As<Object>();
if(!isInFirstRun) {
uint8_t* addr = NativeScriptExtension::GetAddress(o);
if (!isInFirstRun) {
unsigned long addr = NativeScriptExtension::GetAddress(o);
auto itFound = m_visited.find(addr);
if (itFound != m_visited.end()) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion test-app/runtime/src/main/cpp/ObjectManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class ObjectManager {

PersistentObjectIdSet m_released;

std::set<uint8_t*> m_visited;
std::set<unsigned long> m_visited;

LRUCache<int, jweak> m_cache;

Expand Down
4 changes: 2 additions & 2 deletions test-app/runtime/src/main/cpp/Profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ void Profiler::StopCPUProfilerCallbackImpl(const v8::FunctionCallbackInfo<v8::Va
}

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

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

auto success = false;
Expand Down
27 changes: 13 additions & 14 deletions test-app/runtime/src/main/cpp/include/V8NativeScriptExtension.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
#include "v8.h"

namespace v8 {

class NativeScriptExtension {
public:
static uint8_t* GetAddress(const v8::Local<v8::Object>& obj);

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

static void ReleaseClosureObjects(v8::Local<v8::Value>* closureObjects);

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);
static v8::Local<v8::Value>* GetClosureObjects(v8::Isolate* isolate, const v8::Local<v8::Function>& func, int* length);

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

static void CpuFeaturesProbe(bool cross_compile);
private:
NativeScriptExtension();
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);

// static v8::internal::Handle<v8::internal::FixedArray> GetEnumPropertyKeys(const v8::internal::Handle<v8::internal::JSObject>& object, bool cache_result);
};
static v8::Local<v8::Array> GetPropertyKeys(v8::Isolate* isolate, const v8::Local<v8::Context>& context, const v8::Local<v8::Object>& object, bool& success);

static void CpuFeaturesProbe(bool cross_compile);
private:
NativeScriptExtension();
};
}

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ V8_PLATFORM_EXPORT bool PumpMessageLoop(
v8::Platform* platform, v8::Isolate* isolate,
MessageLoopBehavior behavior = MessageLoopBehavior::kDoNotWait);

V8_PLATFORM_EXPORT V8_DEPRECATE_SOON(
V8_PLATFORM_EXPORT V8_DEPRECATED(
"This function has become obsolete and is essentially a nop",
void EnsureEventLoopInitialized(v8::Platform* platform,
v8::Isolate* isolate));
Expand Down
Loading