[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8

dglazkov at chromium.org dglazkov at chromium.org
Wed Feb 10 22:18:05 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit ec2eced30018bfdf4c31134f28eeeef50e262dcb
Author: dglazkov at chromium.org <dglazkov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Feb 6 19:02:34 2010 +0000

    2010-02-06  Dimitri Glazkov  <dglazkov at chromium.org>
    
            Reviewed by Adam Barth.
    
            Using inlines and function-level statics don't mix, according to gcc.
            https://bugs.webkit.org/show_bug.cgi?id=34663
    
            De-inline deviceRGBColorSpaceRef to avoid gcc-bug landmines.
    
            It appears that the initialization check, generated by gcc doesn't account
            for a possibility that the function may be inlined, resulting in lazy
            initialization failure for more than one inlined instance of the function.
    
            No behavior change, so no new tests.
    
            * platform/graphics/cg/GraphicsContextCG.cpp:
            (WebCore::deviceRGBColorSpaceRef):
            * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54465 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8f20509..8a0e851 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-02-06  Dimitri Glazkov  <dglazkov at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Using inlines and function-level statics don't mix, according to gcc.
+        https://bugs.webkit.org/show_bug.cgi?id=34663
+
+        De-inline deviceRGBColorSpaceRef to avoid gcc-bug landmines.
+
+        It appears that the initialization check, generated by gcc doesn't account
+        for a possibility that the function may be inlined, resulting in lazy
+        initialization failure for more than one inlined instance of the function.
+
+        No behavior change, so no new tests.
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::deviceRGBColorSpaceRef):
+        * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
+
 2010-02-05  Geoffrey Garen  <ggaren at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index a339982..205ea87 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -126,6 +126,12 @@ static void setCGStrokeColorSpace(CGContextRef context, ColorSpace colorSpace)
     }
 }
 
+CGColorSpaceRef deviceRGBColorSpaceRef()
+{
+    static CGColorSpaceRef deviceSpace = CGColorSpaceCreateDeviceRGB();
+    return deviceSpace;
+}
+
 GraphicsContext::GraphicsContext(CGContextRef cgContext)
     : m_common(createGraphicsContextPrivate())
     , m_data(new GraphicsContextPlatformPrivate(cgContext))
diff --git a/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h b/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
index 7b80d5b..c1d5c3f 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
+++ b/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
@@ -28,11 +28,7 @@
 namespace WebCore {
 
 // FIXME: This would be in GraphicsContextCG.h if that existed.
-inline CGColorSpaceRef deviceRGBColorSpaceRef()
-{
-    static CGColorSpaceRef deviceSpace = CGColorSpaceCreateDeviceRGB();
-    return deviceSpace;
-}
+CGColorSpaceRef deviceRGBColorSpaceRef();
 
 // FIXME: This would be in GraphicsContextCG.h if that existed.
 inline CGColorSpaceRef sRGBColorSpaceRef()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list