patches/webkit-05-ustring.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 2650 901d2088a9b2
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
     1
diff -r 0ad6c6100f9b JavaScriptCore/runtime/UString.cpp
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
     2
--- a/JavaScriptCore/runtime/UString.cpp	Mon Apr 19 15:15:27 2010 +0800
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
     3
+++ b/JavaScriptCore/runtime/UString.cpp	Mon Apr 19 16:06:27 2010 +0800
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
     4
@@ -705,19 +705,6 @@
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
     5
     return (l1 > l2) ? 1 : -1;
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
     6
 }
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
     7
 
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
     8
-bool equal(const UString::Rep* r, const UString::Rep* b)
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
     9
-{
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    10
-    unsigned length = r->length();
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    11
-    if (length != b->length())
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    12
-        return false;
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    13
-    const UChar* d = r->characters();
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    14
-    const UChar* s = b->characters();
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    15
-    for (unsigned i = 0; i != length; ++i) {
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    16
-        if (d[i] != s[i])
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    17
-            return false;
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    18
-    }
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    19
-    return true;
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    20
-}
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    21
 
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    22
 CString UString::UTF8String(bool strict) const
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    23
 {
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    24
diff -r 0ad6c6100f9b WebCore/platform/text/StringImpl.h
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    25
--- a/WebCore/platform/text/StringImpl.h	Mon Apr 19 15:15:27 2010 +0800
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    26
+++ b/WebCore/platform/text/StringImpl.h	Mon Apr 19 16:07:02 2010 +0800
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    27
@@ -248,7 +248,7 @@
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    28
 
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    29
 private:
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    30
     using Noncopyable::operator new;
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    31
-    void* operator new(size_t, void* inPlace) { ASSERT(inPlace); return inPlace; }
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    32
+    void* operator new(size_t, void* p) { ASSERT(inPlace); return p; }
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    33
 
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    34
     static PassRefPtr<StringImpl> createStrippingNullCharactersSlowCase(const UChar*, unsigned length);
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    35
     
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    36
diff -r f96dc080483f JavaScriptCore/runtime/UStringImpl.h
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    37
--- a/JavaScriptCore/runtime/UStringImpl.h	Thu Apr 22 12:51:41 2010 +0800
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    38
+++ b/JavaScriptCore/runtime/UStringImpl.h	Thu Apr 22 12:58:01 2010 +0800
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    39
@@ -56,10 +56,9 @@
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    40
         BufferSubstring,
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    41
         BufferShared,
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    42
     };
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    43
-
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    44
+public:
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    45
     using Noncopyable::operator new;
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    46
-    void* operator new(size_t, void* inPlace) { return inPlace; }
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    47
-
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    48
+    void* operator new(size_t, void* p) { return p; }
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    49
     // For SmallStringStorage, which allocates an array and uses an in-place new.
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    50
     UStringOrRopeImpl() { }
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    51
 
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    52
@@ -337,7 +336,19 @@
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    53
         static_cast<UStringImpl*>(this)->deref();
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    54
 }
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    55
 
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    56
-bool equal(const UStringImpl*, const UStringImpl*);
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    57
+bool equal(const UStringImpl* r, const UStringImpl* b)
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    58
+{
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    59
+    unsigned length = r->length();
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    60
+    if (length != b->length())
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    61
+        return false;
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    62
+    const UChar* d = r->characters();
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    63
+    const UChar* s = b->characters();
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    64
+    for (unsigned i = 0; i != length; ++i) {
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    65
+        if (d[i] != s[i])
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    66
+            return false;
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    67
+    }
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    68
+    return true;
2650
901d2088a9b2 Bump webkit to 1.1.90
simonjin
parents: 2315
diff changeset
    69
+}
2315
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    70
 
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    71
 }
ef3e0baebb09 Bump webkit-cstd to 1.1.19
simonjin
parents:
diff changeset
    72