Performance improvement of PluginManager with clean up some plugin code.
[framework/web/wrt-plugins-common.git] / src / plugin-loading / javascript_interface.cpp
index 9cb8827..8619404 100644 (file)
@@ -122,7 +122,7 @@ void JavaScriptInterface::setObjectProperty(JSGlobalContextRef context,
                                             const std::string &propertyName,
                                             const JSObjectPtr& propertyObject)
 {
-    LogInfo("Webkit:setting property --" << propertyName << "--");
+    LogInfo("JSObjectSetProperty(" << context << ", \"" << propertyName << "\")");
 
     //create name
     JSStringRef name = JSStringCreateWithUTF8CString(propertyName.c_str());
@@ -144,7 +144,7 @@ void JavaScriptInterface::removeObjectProperty(JSGlobalContextRef context,
         //nothing to do -> no context
         return;
     }
-    LogDebug("Deleting property --" << propertyName << "--");
+    LogDebug("JSObjectDeleteProperty(" << context << ", \"" << propertyName << "\")");
 
     JSStringRef name = JSStringCreateWithUTF8CString(propertyName.c_str());
     JSObjectDeleteProperty(
@@ -179,7 +179,7 @@ JSObjectPtr JavaScriptInterface::makeJSFunctionObject(
     const std::string &name,
     js_function_impl functionImplementation) const
 {
-    LogDebug("Create JS function");
+    LogDebug("JSObjectMakeFunctionWithCallback(" << context << ", \"" << name << "\")");
     JSStringRef jsFunName = JSStringCreateWithUTF8CString(name.c_str());
 
     JSObjectRef object = JSObjectMakeFunctionWithCallback(
@@ -196,7 +196,7 @@ JSObjectPtr JavaScriptInterface::makeJSClassObject(
     JSGlobalContextRef context,
     JSObjectDeclaration::ConstClassTemplate classTemplate) const
 {
-    LogDebug("Create JS object");
+    LogDebug("JSObjectMake(" << context << ")");
     JSObjectRef object = JSObjectMake(
             context,
             static_cast<JSClassRef>(
@@ -209,8 +209,7 @@ JSObjectPtr JavaScriptInterface::makeJSObjectBasedOnInterface(
     JSGlobalContextRef context,
     const std::string &interfaceName) const
 {
-    LogDebug("Create JS object base on interface: " << interfaceName);
-    LogDebug("Context: " << context);
+    LogDebug("makeJSObjectBasedOnInterface(" << context << ", \"" << interfaceName << "\"");
 
     JSObjectPtr jsInterfaceObj = getJSObjectProperty(context,
                                                      getGlobalObject(
@@ -401,6 +400,8 @@ JSObjectPtr JavaScriptInterface::getJSObjectProperty(JSGlobalContextRef ctx,
                                                      const std::string& name)
 const
 {
+    LogDebug("getJSObjectProperty(" << ctx << ", \"" << name << "\")");
+
     JSObjectRef frame_js = static_cast<JSObjectRef>(frame->getObject());
 
     JSValueRef property = getPropertyObj(ctx, frame_js, name.c_str());