Commit 7cbe944f authored by Jacob Potter's avatar Jacob Potter

Enforce use of ARC everywhere; remove broken debug macros.

parent fab9fe8c
...@@ -207,29 +207,11 @@ JniLocalScope::~JniLocalScope() { ...@@ -207,29 +207,11 @@ JniLocalScope::~JniLocalScope() {
} }
bool JniLocalScope::_pushLocalFrame(JNIEnv* const env, jint capacity) { bool JniLocalScope::_pushLocalFrame(JNIEnv* const env, jint capacity) {
#ifdef DBX_JNI_LOCAL_FRAME_DEBUG
JNI_DEBUG_LOGF(VERBOSE, "Pushing local frame count to %d, capacity=%d", s_frameCount+1, capacity);
#endif
const jint push_res = env->PushLocalFrame(capacity); const jint push_res = env->PushLocalFrame(capacity);
#ifdef DBX_JNI_LOCAL_FRAME_DEBUG
if (0 == push_res) {
++s_frameCount;
} else {
JNI_DEBUG_LOGF(ERROR, "%d <- PushLocalFrame(%d)", push_res, capacity);
env->ExceptionDescribe();
}
#endif
return 0 == push_res; return 0 == push_res;
} }
void JniLocalScope::_popLocalFrame(JNIEnv* const env, jobject returnRef) { void JniLocalScope::_popLocalFrame(JNIEnv* const env, jobject returnRef) {
#ifdef DBX_JNI_LOCAL_FRAME_DEBUG
--s_frameCount;
JNI_DEBUG_LOGF(VERBOSE, "Popping local frame count to %d.", s_frameCount);
#endif
env->PopLocalFrame(returnRef); env->PopLocalFrame(returnRef);
} }
......
...@@ -366,10 +366,6 @@ private: ...@@ -366,10 +366,6 @@ private:
static bool _pushLocalFrame(JNIEnv* const env, jint capacity); static bool _pushLocalFrame(JNIEnv* const env, jint capacity);
static void _popLocalFrame(JNIEnv* const env, jobject returnRef); static void _popLocalFrame(JNIEnv* const env, jobject returnRef);
#ifdef DBX_JNI_LOCAL_FRAME_DEBUG
static int s_frameCount;
#endif
JNIEnv* const m_env; JNIEnv* const m_env;
const bool m_success; const bool m_success;
}; };
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
#include "DJIError.h" #include "DJIError.h"
#include <exception> #include <exception>
static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
namespace djinni { namespace djinni {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
// //
#import "DJIWeakPtrWrapper+Private.h" #import "DJIWeakPtrWrapper+Private.h"
static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
@implementation DBWeakPtrWrapper @implementation DBWeakPtrWrapper
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
{ {
"target_name": "djinni_objc", "target_name": "djinni_objc",
"type": "static_library", "type": "static_library",
"xcode_settings": {
"CLANG_ENABLE_OBJC_ARC": "YES",
},
"sources": [ "sources": [
"objc/DJIWeakPtrWrapper.mm", "objc/DJIWeakPtrWrapper.mm",
"objc/DJIError.mm", "objc/DJIError.mm",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment