Skip to content

Commit 2247cbe

Browse files
author
Mihail Slavchev
committed
remove ASSERT_MESSAGE
1 parent aa5d82a commit 2247cbe

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/jni/NativeScriptAssert.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ namespace tns
1818
#define DEBUG_WRITE_FORCE(fmt, args...) __android_log_print(ANDROID_LOG_DEBUG, "TNS.Native", fmt, ##args)
1919
#define DEBUG_WRITE_FATAL(fmt, args...) __android_log_print(ANDROID_LOG_FATAL, "TNS.Native", fmt, ##args)
2020
#define ASSERT(cond) ((cond)?(void)0:__android_log_assert("##cond", "TNS.Native", ""))
21-
#define ASSERT_MESSAGE(cond, fmt, args...) ((cond)?(void)0:__android_log_assert("##cond", "TNS.Native", fmt, ##args))
2221
#define ASSERT_FAIL(fmt, args...) (__android_log_assert(fmt, "TNS.Native", fmt, ##args))
2322
}
2423

src/jni/NativeScriptRuntime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ void NativeScriptRuntime::DisableVerboseLoggingMethodCallback(const v8::Function
739739
void NativeScriptRuntime::ExitMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
740740
{
741741
auto msg = ConvertToString(args[0].As<String>());
742-
ASSERT_MESSAGE(false, "%s", msg.c_str());
742+
ASSERT_FAIL("%s", msg.c_str());
743743
exit(-1);
744744
}
745745

src/jni/ObjectManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void ObjectManager::Link(const Local<Object>& object, uint32_t javaObjectID, jcl
237237

238238
auto jsInfoIdx = static_cast<int>(MetadataNodeKeys::JsInfo);
239239
bool alreadyLinked = !object->GetInternalField(jsInfoIdx)->IsUndefined();
240-
//ASSERT_MESSAGE(alreadyLinked, "object should not have been linked before");
240+
//TODO: fail if alreadyLinked is true?
241241

242242
auto jsInfo = External::New(isolate, jsInstanceInfo);
243243
object->SetInternalField(jsInfoIdx, jsInfo);

0 commit comments

Comments
 (0)