Revert "Revert "Performance improvement of PluginManager with clean up some plugin...
authorTae-Jeong Lee <taejeong.lee@samsung.com>
Tue, 2 Jul 2013 02:05:33 +0000 (11:05 +0900)
committerTae-Jeong Lee <taejeong.lee@samsung.com>
Tue, 2 Jul 2013 02:05:46 +0000 (11:05 +0900)
This reverts commit 7b2dbca5671381be9944aa15fda2810c9fb5361e.

Change-Id: I5fc35614c271be7887d62d628e2c1f37167dc206

src/Commons/JSObjectDeclaration.cpp
src/Commons/JSObjectDeclaration.h
src/js-overlay/CMakeLists.txt
src/js-overlay/deprecated/js_overlay_support.cpp [moved from src/js-overlay/js_overlay_support.cpp with 100% similarity]
src/js-overlay/deprecated/js_overlay_support.h [moved from src/js-overlay/js_overlay_support.h with 100% similarity]
src/modules/tizen/PluginManager/PluginManager.cpp
src/plugin-loading/explorer.cpp
src/plugin-loading/javascript_interface.cpp
src/plugin-loading/js_page_session.cpp
src/plugin-loading/plugin.cpp
src/standards/W3C/Widget/JSWidget.cpp

index 09f5ff8..81578cc 100755 (executable)
@@ -44,23 +44,18 @@ JSObjectDeclaration::~JSObjectDeclaration()
 
 bool JSObjectDeclaration::checkIframesSupported() const
 {
-    LogDebug("Check iframe supported");
     if (!m_options ||
         m_options->getIframeObject() == Options::IFrameObject::None)
     {
-        LogDebug("Iframe NOT supported for object: " << getName());
         return false;
     }
 
-    LogDebug("Iframe supported for object: " << getName());
-
     return true;
 }
 
 JSObjectDeclaration::Options::ClassType
 JSObjectDeclaration::Options::getType() const
 {
-    LogDebug("Get type field from declaration's option");
     Assert(m_options && "Pointer to options is NULL");
 
     switch (m_options->type) {
@@ -74,12 +69,11 @@ JSObjectDeclaration::Options::getType() const
 JSObjectDeclaration::Options::IFrameObject
 JSObjectDeclaration::Options::getIframeObject() const
 {
-    LogDebug("Get Frame Option");
     Assert(m_options && "Options object is NULL");
 
     switch (m_options->iframe_option) {
     case NONE: return IFrameObject::None;
-    case REFERENCE: return IFrameObject::Reference;
+    case REFERENCE: return IFrameObject::Reference; // deprecated
     case CREATE_INSTANCE: return IFrameObject::CreateInstance;
     default:
         Assert(0 && "Wrong value of behaviour type");
@@ -89,7 +83,6 @@ JSObjectDeclaration::Options::getIframeObject() const
 JSObjectDeclaration::Options::IFrameNotice
 JSObjectDeclaration::Options::getIframeNotice() const
 {
-    LogDebug("Get Frame Option");
     Assert(m_options && "Pointer to options is null");
 
     switch (m_options->iframe_notice) {
@@ -100,22 +93,6 @@ JSObjectDeclaration::Options::getIframeNotice() const
     }
 }
 
-JSObjectDeclaration::Options::IFrameOverlay
-JSObjectDeclaration::Options::getIframeOverlay() const
-{
-    LogDebug("Get Frame Option");
-    Assert(m_options && "Pointer to options is null");
-
-    switch (m_options->iframe_overlay) {
-    case IGNORED: return IFrameOverlay::Ignored;
-    case USE_OVERLAYED: return IFrameOverlay::UseOverlayed;
-    case OVERLAYED_BEFORE_ORIGINAL:
-        return IFrameOverlay::OverlayedBeforeOriginal;
-    default:
-        Assert(0 && "Wrong value of overlay option");
-    }
-}
-
 js_function_impl JSObjectDeclaration::Options::getFunctionImpl() const
 {
     Assert(m_options && "Pointer to options is null");
index 699936e..a726029 100644 (file)
@@ -66,8 +66,8 @@ class JSObjectDeclaration : private DPL::Noncopyable
         enum class IFrameOverlay
         {
             Ignored,
-            UseOverlayed,
-            OverlayedBeforeOriginal
+            UseOverlayed,           //deprecated
+            OverlayedBeforeOriginal //deprecated
         };
 
         typedef js_object_instance_t ObjectInstance;
@@ -79,7 +79,6 @@ class JSObjectDeclaration : private DPL::Noncopyable
 
         IFrameObject getIframeObject() const;
         IFrameNotice getIframeNotice() const;
-        IFrameOverlay getIframeOverlay() const;
         js_function_impl getFunctionImpl() const;
 
         void invokeCallback(JsContext ctx,
index 5cbb0d8..f42c3f0 100644 (file)
@@ -28,7 +28,6 @@ pkg_search_module(plugin-types REQUIRED wrt-plugins-types)
 SET(TARGET_NAME ${TARGET_JS_OVERLAY})
 
 SET(SRCS
-    ${CMAKE_CURRENT_SOURCE_DIR}/js_overlay_support.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/js_function_manager.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/js_overlay_functions.cpp
 )
index 2d868d8..b4a56a5 100644 (file)
@@ -176,59 +176,58 @@ bool PluginManager::deleteProperty(const string &name)
 
 Api::IPluginManager::PropertyList PluginManager::getProperties() const
 {
+    using namespace WrtDB;
+
     if (!m_propertyCache.IsNull()) {
         return *m_propertyCache;
     }
 
     m_propertyCache = PropertyList();
 
-    WrtDB::WidgetDAOReadOnly dao(m_widgetHandle);
+    WidgetDAOReadOnly dao(m_widgetHandle);
     string localUri = m_objectUri + SEPARATOR;
 
-    if (dao.getWidgetType() == WrtDB::APP_TYPE_TIZENWEBAPP) {
-        WrtDB::PluginHandleList pluginHandleList =
-            WrtDB::PluginDAOReadOnly::getPluginHandleList();
+    if (dao.getWidgetType() == APP_TYPE_TIZENWEBAPP)
+    {
+        static ImplementedObjectsList implObjectList =
+            PluginDAOReadOnly::getImplementedObjects();
 
-        FOREACH(it_pluginHandle, pluginHandleList)
+        FOREACH(it_implObject, implObjectList)
         {
-            WrtDB::ImplementedObjectsList implObjectList =
-                WrtDB::PluginDAOReadOnly::getImplementedObjectsForPluginHandle(
-                    *it_pluginHandle);
-
-            FOREACH(it_implObject, implObjectList)
-            {
-                //check if implemented object stats with localUri
-                if (it_implObject->find(localUri) == 0) {
-                    string property = *it_implObject;
-                    //remove local uri that predicts property name.
-                    property.erase(0, localUri.size());
-                    //check if property has its own properties.
-                    size_t pos = property.find(SEPARATOR);
-                    if (pos != string::npos) {
-                        //if so then remove them.
-                        property.erase(pos);
-                    }
-                    m_propertyCache->push_back(property);
+            //check if implemented object stats with localUri
+            if (it_implObject->find(localUri) == 0) {
+                string property = *it_implObject;
+                //remove local uri that predicts property name.
+                property.erase(0, localUri.size());
+                //check if property has its own properties.
+                size_t pos = property.find(SEPARATOR);
+                if (pos != string::npos) {
+                    //if so then remove them.
+                    property.erase(pos);
                 }
+
+                m_propertyCache->push_back(property);
             }
         }
-    } else {
-        WrtDB::DbWidgetFeatureSet features;
+    }
+    else
+    {
+        DbWidgetFeatureSet features;
 
         Try
         {
             features = dao.getFeaturesList();
         }
-        Catch(WrtDB::WidgetDAOReadOnly::Exception::Base)
+        Catch(WidgetDAOReadOnly::Exception::Base)
         {
             LogError("Cannot get feature list");
             ReThrow(Commons::PlatformException);
         }
 
-        WrtDB::DbWidgetFeatureSet::const_iterator feature = features.begin();
+        DbWidgetFeatureSet::const_iterator feature = features.begin();
         for (; feature != features.end(); ++feature) {
-            WrtDB::ImplementedObjectsList implObjs =
-                WrtDB::PluginDAOReadOnly::getImplementedObjectsForPluginHandle(
+            ImplementedObjectsList implObjs =
+                PluginDAOReadOnly::getImplementedObjectsForPluginHandle(
                     feature->pluginId);
             FOREACH(it, implObjs) {
                 //check if implemented object stats with localUri
index 1ecad15..3b385f6 100644 (file)
@@ -28,7 +28,6 @@
 #include "plugin_property_support.h"
 
 // JS overlay
-#include <js_overlay_support.h>
 #include <js_overlay_types.h>
 
 namespace {
@@ -51,7 +50,6 @@ Explorer::Explorer(JSGlobalContextRef context) :
     m_globalObject =
         JavaScriptInterfaceSingleton::Instance().getGlobalObject(context);
 
-    LogDebug("Register main frame");
     //register main frame;
     m_iframeSupport.registerIframe(m_globalObject);
 
@@ -65,7 +63,6 @@ Explorer::~Explorer()
 JSObjectPtr Explorer::getJSObjectProperty(const std::string& propertyName,
                                           JSObjectPtr object)
 {
-    LogDebug("Get object property " << propertyName);
     return JavaScriptInterfaceSingleton::Instance().getJSObjectProperty(
                m_context, object, propertyName);
 }
@@ -111,15 +108,11 @@ JSObjectPtr Explorer::getProperty(
 bool Explorer::registerObject(const JSObjectDeclarationPtr& declaration,
                               JSGlobalContextRef context)
 {
-    LogDebug("Register to global object");
-
     bool retValue;
 
     if (declaration->getParentName() == GLOBAL_OBJECT_NAME) {
-        LogDebug("Connect to Global object");
         retValue = register_(declaration, m_globalObject, context);
     } else { //PIM support
-        LogDebug("Connect to NOT global object");
         //it should be master object name
         string masterName = declaration->getParentName();
         auto pos = masterName.find(".");
@@ -138,13 +131,10 @@ bool Explorer::registerObject(const JSObjectDeclarationPtr& declaration,
     }
 
     if (declaration->checkIframesSupported()) {
-        LogDebug("Iframe supported");
         m_iframeSupport.registerDeclaration(declaration);
         //        m_iframeSupport.invokeCallbackForMainFrame(m_context,
         //                                                   declaration,
         //                                                   newObject);
-    } else {
-        LogDebug("Iframe NOT supported");
     }
 
     return retValue;
@@ -155,19 +145,16 @@ bool Explorer::registerObject(const JSObjectDeclarationPtr& declaration,
                               JSObjectPtr providedObject,
                               JSGlobalContextRef context)
 {
-    LogDebug(
-        "Register object. Provided object name: '" << providedObjectName
-                                                   <<
-        "', registration of: '" << declaration->getName() << "'");
+    LogDebug("'" << providedObjectName << "' <- '" << declaration->getName() << "'");
 
     std::string fullParentName = declaration->getParentName();
-    LogDebug("Parent name: " << declaration->getParentName());
 
     if (fullParentName == providedObjectName) {
-        LogDebug("Provided object match equaly to requested parent");
         return register_(declaration, providedObject, context);
     }
 
+    LogDebug("Provided object was not matched!!");
+
     //check if object exists in fullParentName
     auto pos = fullParentName.find(providedObjectName);
     if (pos == string::npos) {
@@ -219,43 +206,14 @@ bool Explorer::register_(const JSObjectDeclarationPtr& declaration,
     typedef JSObjectDeclaration::Options JO;
 
     JSGlobalContextRef gContext = (context == NULL) ? m_context : context;
-    JSObjectPtr newObject;
-
     JSObjectPtr objectInstance = JavaScriptInterfaceSingleton::Instance().
             createObject(gContext, declaration);
 
-    //function creation
-    if (declaration->getOptions() &&
-        declaration->getOptions()->getType() == JO::ClassType::Function)
-    {
-        LogDebug("Loading function object " << declaration->getName());
-
-        auto type = declaration->getOptions()->getIframeOverlay();
-        if (JO::IFrameOverlay::OverlayedBeforeOriginal == type) {
-            LogDebug("Create overlayed function");
-            JSObjectPtr original =
-                JavaScriptInterfaceSingleton::Instance().
-                    getJSObjectProperty(gContext,
-                                        parent,
-                                        declaration->getName());
-            newObject = JSOverlaySupport::
-                    createWrappedFunction(gContext,
-                                          original,
-                                          objectInstance,
-                                          declaration->getName());
-        } else {
-            LogDebug("create normal function");
-            newObject = objectInstance;
-        }
-    } else { //object creation
-        newObject = objectInstance;
-    }
-
     JavaScriptInterfaceSingleton::Instance().setObjectProperty(
         gContext,
         parent,
         declaration->getName(),
-        newObject);
+        objectInstance);
 
     //notice
     if (declaration->getOptions() &&
@@ -369,7 +327,7 @@ void Explorer::cleanIframesData()
     m_iframeSupport.clean();
 }
 
-void Explorer::callEventListeners(CustomEventType eventType, void* data)
+void Explorer::callEventListeners(CustomEventType /*eventType*/, void* /*data*/)
 {
 #if 0 // deprecated
     using namespace WrtPlugins::Tizen;
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());
index 24a3d49..354403e 100644 (file)
@@ -100,9 +100,8 @@ class JSPageSession::Impl
   private:
     PluginPtr loadLibrary(PluginModelPtr& pluginModel);
 
-    void loadInjectedJavaScript();
     void installStandardFunctions();
-     void installRootPlugins();
+    void installRootPlugins();
     void installRequestedFeatures();
 
     //returns true if success or false if failed
@@ -148,13 +147,8 @@ JSPageSession::Impl::Impl(const PluginContainerSupportPtr& support) :
         m_sessionStarted(false),
         m_objectExplorer(NULL)
 {
-    //    DPL::Log::LogSystemSingleton::Instance().SetTag("WRT_PLUGINS");
     LogDebug("Initializing Page Session");
     m_pluginsSupport = support;
-
-    // explicit call to keep singleton's lifetime until calling destructor.
-    //    JsFunctionManagerSingleton::Instance();
-    //    JavaScriptInterfaceSingleton::Instance();
 }
 
 JSPageSession::Impl::~Impl()
@@ -176,7 +170,7 @@ JSPageSession::Impl::~Impl()
         m_objectExplorer->registerObject(*it, NULL);
     }
 
-     LogInfo("Standard functions installed.");
+    LogInfo("Installing standard functions...[done]");
  }
 
 void JSPageSession::Impl::installRootPlugins()
@@ -190,7 +184,7 @@ void JSPageSession::Impl::installRootPlugins()
         installPlugin(*it);
     }
 
-    LogInfo("requested root plugins installed.");
+    LogInfo("Installing requested root plugins...[done]");
 }
 
 bool JSPageSession::Impl::installPlugin(PluginModelPtr plugin)
@@ -203,7 +197,7 @@ bool JSPageSession::Impl::installPlugin(PluginModelPtr plugin)
         return false;
     }
 
-    LogInfo("Install Plugin '" << library->GetFileName());
+    LogInfo("Install Plugin " << library->GetFileName());
 
     // Register new class
     FOREACH(it, *(library->GetClassList()))
@@ -213,7 +207,7 @@ bool JSPageSession::Impl::installPlugin(PluginModelPtr plugin)
         }
     }
 
-    LogDebug("Registered feature.");
+    LogInfo("Install Plugin [done]");
     return true;
 }
 
@@ -380,115 +374,6 @@ void JSPageSession::Impl::dispatchJavaScriptEvent(CustomEventType eventType,
     m_objectExplorer->callEventListeners(eventType, data);
 }
 
-void JSPageSession::Impl::loadInjectedJavaScript()
-{
-    LogInfo("Entered");
-
-    std::string DIR_PATH = "/usr/etc/wrt/injected-javascript";
-    std::string JS_EXTENSION = ".js";
-
-    DIR *dir = opendir(DIR_PATH.c_str());
-
-    if (!dir) {
-        LogError("opendir(\"" << DIR_PATH << "\") error!");
-        return;
-    }
-
-    int return_code;
-    struct dirent libdir;
-    struct dirent* result;
-    std::list<std::string> jsFiles;
-
-    // make file list from DIR_PATH
-    for (return_code = readdir_r(dir, &libdir, &result);
-            result != NULL && return_code == 0;
-            return_code = readdir_r(dir, &libdir, &result)) {
-        if (strncmp(libdir.d_name, ".", 2) == 0 ||
-            strncmp(libdir.d_name, "..", 3) == 0)
-        {
-            continue;
-        }
-
-        std::string filepath = DIR_PATH;
-        filepath += "/";
-        filepath += libdir.d_name;
-
-        std::string lowercase = filepath;
-        std::transform(lowercase.begin(), lowercase.end(), lowercase.begin(),
-                       towlower);
-
-        if (lowercase.rfind(JS_EXTENSION) == std::string::npos ||
-            lowercase.length() !=
-            lowercase.rfind(JS_EXTENSION) + JS_EXTENSION.length() )
-        {
-            LogError("This is not js file" << filepath);
-            continue;
-        }
-
-        struct stat tmp;
-
-        if (stat(filepath.c_str(), &tmp) == -1) {
-            LogError("Failed to open file " << filepath);
-            continue;
-        }
-
-        if (!S_ISREG(tmp.st_mode)) {
-            LogError("This is not a regular file " << filepath);
-            continue;
-        }
-
-        LogInfo("Added : " << filepath);
-        jsFiles.push_back(filepath);
-    }
-    if (0 != return_code)
-        LogError("Error while reading directory.");
-
-    closedir(dir);
-
-    FOREACH(it, jsFiles)
-    {
-        LogDebug("load file : " << (*it));
-        // load file
-        std::string content;
-        std::ifstream fin(it->c_str());
-
-        while (fin.good()) {
-            string line;
-            std::getline(fin, line);
-            content += line + "\n";
-        }
-
-        fin.close();
-        // execute
-        if (!content.empty()) {
-            JSValueRef exception = NULL;
-            JSStringRef script =
-                JSStringCreateWithUTF8CString(content.c_str());
-
-            JSEvaluateScript(m_context, script, NULL, NULL, 1, &exception);
-
-            JSStringRelease(script);
-
-            if (exception) {
-                LogDebug("Exception Occured while injecting javascript "
-                         "file. : " << *it);
-
-                JSStringRef exceptionJSString =
-                    JSValueToStringCopy(m_context, exception, NULL);
-                size_t size =
-                    JSStringGetMaximumUTF8CStringSize(exceptionJSString);
-                char* exceptionString = new char[size];
-                JSStringGetUTF8CString(exceptionJSString,
-                                       exceptionString, size);
-                LogDebug("Exception : " << exceptionString);
-
-                delete[] exceptionString;
-                JSStringRelease(exceptionJSString);
-            }
-        }
-    }
-}
-
 void JSPageSession::Impl::startSession(int widgetHandle,
                                        JSGlobalContextRef context,
                                        double scaleFactor,
@@ -525,9 +410,7 @@ void JSPageSession::Impl::startSession(int widgetHandle,
     // set scale, bundle as window's property
     setCustomProperties(scaleFactor, encodedBundle, theme);
 
-    // Load injected javascript files
-    loadInjectedJavaScript();
-    LogInfo("Widget session started.");
+    LogInfo("Starting widget session...[done]");
 }
 
 void JSPageSession::Impl::stopSession()
@@ -661,7 +544,7 @@ void JSPageSession::Impl::loadFrame(JSGlobalContextRef context)
 
     FOREACH(pluginIt, m_loadedPlugins)
     {
-        LogDebug("load plugin to frame" << (*pluginIt)->GetFileName());
+        LogDebug("Try to call 'OnFrameLoad' callback : " << (*pluginIt)->GetFileName());
 
         (*pluginIt)->OnFrameLoad(context);
     }
@@ -682,7 +565,7 @@ void JSPageSession::Impl::unloadFrame(JSGlobalContextRef context)
 
     FOREACH(pluginIt, m_loadedPlugins)
     {
-        LogDebug("unload plugin to frame" << (*pluginIt)->GetFileName());
+        LogDebug("Try to call 'OnFrameUnload' callback : " << (*pluginIt)->GetFileName());
 
         (*pluginIt)->OnFrameUnload(context);
     }
index 16b92e6..f3cdb16 100644 (file)
@@ -208,8 +208,7 @@ void Plugin::OnWidgetStart(int widgetId)
 {
     if (NULL != m_apiOnWidgetStart) {
         (*m_apiOnWidgetStart)(widgetId);
-    } else {
-        LogWarning("OnWidgetStart not set!");
+        LogInfo("Called!");
     }
 }
 
@@ -218,8 +217,7 @@ void Plugin::OnWidgetInit(feature_mapping_interface_t* mapping)
     Assert(NULL != mapping && "NULL mapping interface provided");
     if (NULL != m_apiOnWidgetInit) {
         (*m_apiOnWidgetInit)(mapping);
-    } else {
-        LogWarning("OnWidgetInit not set!");
+        LogInfo("Called!");
     }
 }
 
@@ -227,8 +225,7 @@ void Plugin::OnWidgetStop(int widgetId)
 {
     if (NULL != m_apiOnWidgetStop) {
         (*m_apiOnWidgetStop)(widgetId);
-    } else {
-        LogWarning("OnWidgetStop not set!");
+        LogInfo("Called!");
     }
 }
 
@@ -236,8 +233,7 @@ void Plugin::OnFrameLoad(java_script_context_t context)
 {
     if (NULL != m_apiOnFrameLoad) {
         (*m_apiOnFrameLoad)(context);
-    } else {
-        LogWarning("OnFrameLoad not set!");
+        LogInfo("Called!");
     }
 }
 
@@ -245,8 +241,7 @@ void Plugin::OnFrameUnload(java_script_context_t context)
 {
     if (NULL != m_apiOnFrameUnload) {
         (*m_apiOnFrameUnload)(context);
-    } else {
-        LogWarning("OnFrameUnload not set!");
+        LogInfo("Called!");
     }
 }
 
index 162820f..8a6843c 100644 (file)
@@ -237,8 +237,7 @@ JSContextRef JSWidget::m_globalContext = NULL;
 void JSWidget::initialize(JSContextRef context,
                           JSObjectRef object)
 {
-    LogDebug("entered. Context : " << context);
-    LogDebug("Object: " << object);
+    LogDebug("entered. Context : " << context << ", Object: " << object);
 
     JSWidgetPrivateObject* priv =
         static_cast<JSWidgetPrivateObject*>(JSObjectGetPrivate(object));
@@ -266,7 +265,6 @@ void JSWidget::initialize(JSContextRef context,
 
             priv = new JSWidgetPrivateObject(context, widgetPriv);
             JSObjectSetPrivate(object, priv);
-            LogDebug("private object created");
         }
         Catch(Commons::InvalidArgumentException){
             LogError("You should register widget id in ON_WIDGET_START");
@@ -298,8 +296,8 @@ void JSWidget::finalize(JSObjectRef object)
 }
 
 void JSWidget::acquireGlobalContext(java_script_context_t global_context,
-                                    js_object_instance_t iframe,
-                                    js_object_instance_t object)
+                                    js_object_instance_t /*iframe*/,
+                                    js_object_instance_t /*object*/)
 {
     if (!m_globalContext) {
         m_globalContext = static_cast<JSContextRef>(global_context);