This commit is contained in:
Ari Lazier 2015-12-01 19:46:31 -08:00
parent c3d5fd4e09
commit 3aaf988953
6 changed files with 14 additions and 10 deletions

View File

@ -7,6 +7,8 @@
#include "js_util.hpp"
#include "object_accessor.hpp"
#include <assert.h>
using RJSAccessor = realm::NativeAccessor<JSValueRef, JSContextRef>;
using namespace realm;

View File

@ -5,6 +5,7 @@
#pragma once
#include "js_util.hpp"
#include <memory>
namespace realm {
class Realm;

View File

@ -48,7 +48,7 @@ std::string RJSStringForJSString(JSStringRef jsString) {
}
std::string RJSStringForValue(JSContextRef ctx, JSValueRef value) {
JSValueRef *exception;
JSValueRef *exception = nullptr;
JSStringRef jsString = JSValueToStringCopy(ctx, value, exception);
if (!jsString) {
throw RJSException(ctx, *exception);

View File

@ -8,7 +8,9 @@
#include <JavaScriptCore/JSObjectRef.h>
#include <JavaScriptCore/JSStringRef.h>
#include <math.h>
#include <string>
#include <stdexcept>
#include <cmath>
#include "property.hpp"

View File

@ -4,8 +4,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE := librealmreact
LOCAL_SRC_FILES := \
js_list.cpp \
js_results.cpp \
@ -16,14 +14,16 @@ LOCAL_SRC_FILES := \
js_schema.cpp \
rpc.cpp \
LOCAL_CFLAGS += -fexceptions -I$(LOCAL_PATH)/inc/include -I$(LOCAL_PATH)/../../../../../../../vendor/ -std=c++11 -frtti
CXX11_FLAGS := -std=gnu++11
LOCAL_CFLAGS += -Wall -Werror -fexceptions
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_C_INCLUDES := ../../../../../../../vendor
LOCAL_C_INCLUDES += ../../../../../../../core/include
LOCAL_SHARED_LIBRARIES := libjsc
include $(BUILD_SHARED_LIBRARY)
$(call import-module,jsc)

View File

@ -7,11 +7,10 @@ APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party
APP_STL := c++_static
APP_CFLAGS += -std=c++11
APP_STL := c++_shared
APP_CPPFLAGS += -frtti
# Make sure every shared lib includes a .note.gnu.build-id header
APP_LDFLAGS := -Wl,--build-id
NDK_TOOLCHAIN_VERSION := clang
NDK_TOOLCHAIN_VERSION := 4.8