Title: [129305] trunk/Source/WebCore
Revision
129305
Author
[email protected]
Date
2012-09-22 04:32:30 -0700 (Sat, 22 Sep 2012)

Log Message

[GTK] Build is broken with GLib Unicode backend
https://bugs.webkit.org/show_bug.cgi?id=97308.

Patch by Thierry Reding <[email protected]> on 2012-09-22
Reviewed by Carlos Garcia Campos.

The TextBreakIteratorGtk implementation uses ubrk_close() to delete
the iterator. However that function is ICU specific and not declared
when using the GLib backend. Instead the iterator can simply be freed
using the delete operator.

This commit is based on work by Martin Schlemmer who posted a fix for
this here:

    http://permalink.gmane.org/gmane.os.opendarwin.webkit.gtk/1210

No new tests.

* platform/text/gtk/TextBreakIteratorGtk.cpp:
(WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator):
Free iterator using delete instead of ubrk_close().

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (129304 => 129305)


--- trunk/Source/WebCore/ChangeLog	2012-09-22 10:31:49 UTC (rev 129304)
+++ trunk/Source/WebCore/ChangeLog	2012-09-22 11:32:30 UTC (rev 129305)
@@ -1,3 +1,26 @@
+2012-09-22  Thierry Reding  <[email protected]>
+
+        [GTK] Build is broken with GLib Unicode backend
+        https://bugs.webkit.org/show_bug.cgi?id=97308.
+
+        Reviewed by Carlos Garcia Campos.
+
+        The TextBreakIteratorGtk implementation uses ubrk_close() to delete
+        the iterator. However that function is ICU specific and not declared
+        when using the GLib backend. Instead the iterator can simply be freed
+        using the delete operator.
+
+        This commit is based on work by Martin Schlemmer who posted a fix for
+        this here:
+
+            http://permalink.gmane.org/gmane.os.opendarwin.webkit.gtk/1210
+
+        No new tests.
+
+        * platform/text/gtk/TextBreakIteratorGtk.cpp:
+        (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator):
+        Free iterator using delete instead of ubrk_close().
+
 2012-09-21  Ami Fischman  <[email protected]>
 
         HTMLMediaElement isn't garbage collected between document reloads

Modified: trunk/Source/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp (129304 => 129305)


--- trunk/Source/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp	2012-09-22 10:31:49 UTC (rev 129304)
+++ trunk/Source/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp	2012-09-22 11:32:30 UTC (rev 129305)
@@ -233,7 +233,7 @@
 NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator()
 {
     if (!weakCompareAndSwap(reinterpret_cast<void**>(&nonSharedCharacterBreakIterator), 0, m_iterator))
-        ubrk_close(m_iterator);
+        delete m_iterator;
 }
 
 TextBreakIterator* cursorMovementIterator(const UChar* string, int length)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to