Skip to content
Merged
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
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.9.427.23"
"v8Version": "6.7.288.46"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tns-android",
"description": "NativeScript Runtime for Android",
"version": "5.0.0",
"version": "4.3.0",
"repository": {
"type": "git",
"url": "https://github.com/NativeScript/android-runtime.git"
Expand Down
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: 2 additions & 1 deletion 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,6 +195,7 @@ 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) {
unsigned long addr = NativeScriptExtension::GetAddress(o);
if(!isInFirstRun) {
uint8_t* 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<unsigned long> m_visited;
std::set<uint8_t*> 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 = CpuProfiler::New(isolate);
auto v8prof = isolate->GetCpuProfiler();
v8prof->StartProfiling(name, true);
}

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

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

namespace v8 {

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

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

static v8::Local<v8::Value>* GetClosureObjects(v8::Isolate* isolate, const v8::Local<v8::Function>& func, int* length);
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 void ReleaseClosureObjects(v8::Local<v8::Value>* closureObjects);
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 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 void CpuFeaturesProbe(bool cross_compile);
private:
NativeScriptExtension();

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();
};
// static v8::internal::Handle<v8::internal::FixedArray> GetEnumPropertyKeys(const v8::internal::Handle<v8::internal::JSObject>& object, bool cache_result);
};
}

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_DEPRECATED(
V8_PLATFORM_EXPORT V8_DEPRECATE_SOON(
"This function has become obsolete and is essentially a nop",
void EnsureEventLoopInitialized(v8::Platform* platform,
v8::Isolate* isolate));
Expand Down
Loading