Title: [106921] trunk/Source/WebKit2
Revision
106921
Author
[email protected]
Date
2012-02-07 03:45:29 -0800 (Tue, 07 Feb 2012)

Log Message

[EFL][WK2] Add ModuleEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=63608

Patch by YoungTaeck Song <[email protected]> on 2012-02-07
Reviewed by Andreas Kling.

Add first version of ModuleEfl.cpp including load(), unload() and platformFunctionPointer().

* Platform/Module.h:
* Platform/efl/ModuleEfl.cpp: Added.
(WebKit::Module::load):
(WebKit::Module::unload):
(WebKit::Module::platformFunctionPointer):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (106920 => 106921)


--- trunk/Source/WebKit2/ChangeLog	2012-02-07 11:42:39 UTC (rev 106920)
+++ trunk/Source/WebKit2/ChangeLog	2012-02-07 11:45:29 UTC (rev 106921)
@@ -1,3 +1,18 @@
+2012-02-07  YoungTaeck Song  <[email protected]>
+
+        [EFL][WK2] Add ModuleEfl.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=63608
+
+        Reviewed by Andreas Kling.
+
+        Add first version of ModuleEfl.cpp including load(), unload() and platformFunctionPointer().
+
+        * Platform/Module.h:
+        * Platform/efl/ModuleEfl.cpp: Added.
+        (WebKit::Module::load):
+        (WebKit::Module::unload):
+        (WebKit::Module::platformFunctionPointer):
+
 2012-02-07  Michael BrĂ¼ning  <[email protected]>
 
         [Qt][WK2] Compute and set cache capacities using the current CacheModel

Modified: trunk/Source/WebKit2/Platform/Module.h (106920 => 106921)


--- trunk/Source/WebKit2/Platform/Module.h	2012-02-07 11:42:39 UTC (rev 106920)
+++ trunk/Source/WebKit2/Platform/Module.h	2012-02-07 11:45:29 UTC (rev 106921)
@@ -41,6 +41,10 @@
 typedef struct _GModule GModule;
 #endif
 
+#if PLATFORM(EFL)
+#include <Eina.h>
+#endif
+
 namespace WebKit {
 
 class Module {
@@ -79,6 +83,8 @@
     QLibrary m_lib;
 #elif PLATFORM(GTK)
     GModule* m_handle;
+#elif PLATFORM(EFL)
+    OwnPtr<Eina_Module> m_module;
 #endif
 };
 

Added: trunk/Source/WebKit2/Platform/efl/ModuleEfl.cpp (0 => 106921)


--- trunk/Source/WebKit2/Platform/efl/ModuleEfl.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Platform/efl/ModuleEfl.cpp	2012-02-07 11:45:29 UTC (rev 106921)
@@ -0,0 +1,53 @@
+/*
+    Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "Module.h"
+
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/text/CString.h>
+
+namespace WebKit {
+
+bool Module::load()
+{
+    m_module = adoptPtr(eina_module_new(m_path.utf8().data()));
+    if (!m_module || !eina_module_load(m_module.get())) {
+        m_module = nullptr;
+        return false;
+    }
+
+    return true;
+}
+
+void Module::unload()
+{
+    m_module = nullptr;
+}
+
+void* Module::platformFunctionPointer(const char* functionName) const
+{
+    if (m_module)
+        return eina_module_symbol_get(m_module.get(), functionName);
+
+    return 0;
+}
+
+}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to