[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:15:20 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit b8f2f030bde1a44060e5aefe485e16d5e57d91f3
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 9 03:05:36 2010 +0000

    2010-02-08  Evan Martin  <evan at chromium.org>
    
            dlopen() knows how to search the library search path, so just rely on
            it.  While I'm at it, print out the dlerror() error message on failure.
    
            [chromium] webgl shouldn't hard code library search path
            https://bugs.webkit.org/show_bug.cgi?id=34659
    
            * src/GraphicsContext3D.cpp:
            (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection):
            (WebCore::GraphicsContext3DInternal::GLConnection::create):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index f87bae5..6c34f7e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-08  Evan Martin  <evan at chromium.org>
+
+        dlopen() knows how to search the library search path, so just rely on
+        it.  While I'm at it, print out the dlerror() error message on failure.
+
+        [chromium] webgl shouldn't hard code library search path
+        https://bugs.webkit.org/show_bug.cgi?id=34659
+
+        * src/GraphicsContext3D.cpp:
+        (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection):
+        (WebCore::GraphicsContext3DInternal::GLConnection::create):
+
 2010-02-08  Charlie Reis  <creis at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 7fe31b0..023e4e4 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -275,14 +275,6 @@ private:
             , m_glXGetCurrentContext(getCurrentContext)
         {
         }
-
-        static void* tryLoad(const char* libName)
-        {
-            // We use RTLD_GLOBAL semantics so that GLEW initialization works;
-            // GLEW expects to be able to open the current process's handle
-            // and do dlsym's of GL entry points from there.
-            return dlopen(libName, RTLD_LAZY | RTLD_GLOBAL);
-        }
     };
 
     static GLConnection* s_gl;
@@ -304,22 +296,13 @@ GraphicsContext3DInternal::GLConnection* GraphicsContext3DInternal::GLConnection
         return 0;
     }
 
-    void* libGL = 0;
-    const char* libNames[] = {
-        "/usr/lib/libGL.so.1",
-        "/usr/lib32/libGL.so.1",
-        "/usr/lib64/libGL.so.1",
-    };
-    for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++) {
-        libGL = tryLoad(libNames[i]);
-        if (libGL)
-            break;
-    }
+    // We use RTLD_GLOBAL semantics so that GLEW initialization works;
+    // GLEW expects to be able to open the current process's handle
+    // and do dlsym's of GL entry points from there.
+    void* libGL = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
     if (!libGL) {
-        printf("GraphicsContext3D: error opening libGL.so.1\n");
-        printf("GraphicsContext3D: tried:\n");
-        for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++)
-            printf(" %s\n", libNames[i]);
+        XCloseDisplay(dpy);
+        printf("GraphicsContext3D: error opening libGL.so.1: %s\n", dlerror());
         return 0;
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list