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
6 changes: 1 addition & 5 deletions runtime/src/main/jni/CallbackHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ bool CallbackHandlers::RegisterInstance(Isolate* isolate, const Local<Object>& j

int javaObjectID = objectManager->GenerateNewObjectID();

DEBUG_WRITE("RegisterInstance: Linking new instance");
objectManager->Link(jsObject, javaObjectID, nullptr);

// resolve constructor
Expand Down Expand Up @@ -122,11 +121,10 @@ bool CallbackHandlers::RegisterInstance(Isolate* isolate, const Local<Object>& j
success = !localInstance.IsNull();

if (success) {
DEBUG_WRITE("RegisterInstance: Updating linked instance with its real class");
jclass instanceClass = env.FindClass(fullClassName);
objectManager->SetJavaClass(jsObject, instanceClass);
} else {
DEBUG_WRITE("RegisterInstance failed with null new instance");
DEBUG_WRITE_FORCE("RegisterInstance failed with null new instance class: %s", fullClassName.c_str());
}

return success;
Expand Down Expand Up @@ -775,8 +773,6 @@ Local<Value> CallbackHandlers::CallJSMethod(Isolate* isolate, JNIEnv* _env,
arguments[i] = jsArgs->Get(i);
}

DEBUG_WRITE("implementationObject->GetIdentityHash()=%d", jsObject->GetIdentityHash());

TryCatch tc;
Local<Value> jsResult;
{
Expand Down
9 changes: 1 addition & 8 deletions runtime/src/main/jni/ObjectManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ JniLocalRef ObjectManager::GetJavaObjectByJsObject(const Local<Object>& object)
}

ObjectManager::JSInstanceInfo* ObjectManager::GetJSInstanceInfo(const Local<Object>& object) {
DEBUG_WRITE("ObjectManager::GetJSInstanceInfo: called");
JSInstanceInfo* jsInstanceInfo = nullptr;

auto isolate = m_isolate;
Expand Down Expand Up @@ -140,8 +139,6 @@ jclass ObjectManager::GetJavaClass(const Local<Object>& instance) {
}

void ObjectManager::SetJavaClass(const Local<Object>& instance, jclass clazz) {
DEBUG_WRITE("SetClass called");

JSInstanceInfo* jsInfo = GetJSInstanceInfo(instance);
jsInfo->ObjectClazz = clazz;
}
Expand Down Expand Up @@ -275,8 +272,6 @@ void ObjectManager::JSObjectWeakCallbackStatic(const WeakCallbackInfo<ObjectWeak
* These objects are categorized by "regular" and "callback" and saved in different arrays for performance optimizations during GC
* */
void ObjectManager::JSObjectWeakCallback(Isolate* isolate, ObjectWeakCallbackState* callbackState) {
DEBUG_WRITE("JSObjectWeakCallback called");

HandleScope handleScope(isolate);

Persistent<Object>* po = callbackState->target;
Expand Down Expand Up @@ -319,8 +314,6 @@ int ObjectManager::GenerateNewObjectID() {
}

void ObjectManager::ReleaseJSInstance(Persistent<Object>* po, JSInstanceInfo* jsInstanceInfo) {
DEBUG_WRITE("ReleaseJSInstance instance");

int javaObjectID = jsInstanceInfo->JavaObjectID;

auto it = m_idToObject.find(javaObjectID);
Expand Down Expand Up @@ -522,7 +515,7 @@ void ObjectManager::MarkReachableObjects(Isolate* isolate, const Local<Object>&
} // while
}

void ObjectManager::MarkReachableArrayElements(Local<Object> &o, stack<Local<Value>> &s) {
void ObjectManager::MarkReachableArrayElements(Local<Object>& o, stack<Local<Value>>& s) {
auto arr = o.As<Array>();

int arrEnclosedObjectsLength = arr->Length();
Expand Down