2650
|
1 |
diff -r 0ad6c6100f9b JavaScriptCore/runtime/UString.cpp
|
|
2 |
--- a/JavaScriptCore/runtime/UString.cpp Mon Apr 19 15:15:27 2010 +0800
|
|
3 |
+++ b/JavaScriptCore/runtime/UString.cpp Mon Apr 19 16:06:27 2010 +0800
|
|
4 |
@@ -705,19 +705,6 @@
|
2315
|
5 |
return (l1 > l2) ? 1 : -1;
|
|
6 |
}
|
|
7 |
|
|
8 |
-bool equal(const UString::Rep* r, const UString::Rep* b)
|
|
9 |
-{
|
2650
|
10 |
- unsigned length = r->length();
|
|
11 |
- if (length != b->length())
|
2315
|
12 |
- return false;
|
2650
|
13 |
- const UChar* d = r->characters();
|
|
14 |
- const UChar* s = b->characters();
|
|
15 |
- for (unsigned i = 0; i != length; ++i) {
|
2315
|
16 |
- if (d[i] != s[i])
|
|
17 |
- return false;
|
|
18 |
- }
|
|
19 |
- return true;
|
|
20 |
-}
|
|
21 |
|
|
22 |
CString UString::UTF8String(bool strict) const
|
|
23 |
{
|
2650
|
24 |
diff -r 0ad6c6100f9b WebCore/platform/text/StringImpl.h
|
|
25 |
--- a/WebCore/platform/text/StringImpl.h Mon Apr 19 15:15:27 2010 +0800
|
|
26 |
+++ b/WebCore/platform/text/StringImpl.h Mon Apr 19 16:07:02 2010 +0800
|
|
27 |
@@ -248,7 +248,7 @@
|
|
28 |
|
|
29 |
private:
|
|
30 |
using Noncopyable::operator new;
|
|
31 |
- void* operator new(size_t, void* inPlace) { ASSERT(inPlace); return inPlace; }
|
|
32 |
+ void* operator new(size_t, void* p) { ASSERT(inPlace); return p; }
|
2315
|
33 |
|
2650
|
34 |
static PassRefPtr<StringImpl> createStrippingNullCharactersSlowCase(const UChar*, unsigned length);
|
|
35 |
|
|
36 |
diff -r f96dc080483f JavaScriptCore/runtime/UStringImpl.h
|
|
37 |
--- a/JavaScriptCore/runtime/UStringImpl.h Thu Apr 22 12:51:41 2010 +0800
|
|
38 |
+++ b/JavaScriptCore/runtime/UStringImpl.h Thu Apr 22 12:58:01 2010 +0800
|
|
39 |
@@ -56,10 +56,9 @@
|
|
40 |
BufferSubstring,
|
|
41 |
BufferShared,
|
|
42 |
};
|
|
43 |
-
|
2315
|
44 |
+public:
|
|
45 |
using Noncopyable::operator new;
|
|
46 |
- void* operator new(size_t, void* inPlace) { return inPlace; }
|
2650
|
47 |
-
|
2315
|
48 |
+ void* operator new(size_t, void* p) { return p; }
|
2650
|
49 |
// For SmallStringStorage, which allocates an array and uses an in-place new.
|
|
50 |
UStringOrRopeImpl() { }
|
2315
|
51 |
|
2650
|
52 |
@@ -337,7 +336,19 @@
|
|
53 |
static_cast<UStringImpl*>(this)->deref();
|
|
54 |
}
|
2315
|
55 |
|
|
56 |
-bool equal(const UStringImpl*, const UStringImpl*);
|
|
57 |
+bool equal(const UStringImpl* r, const UStringImpl* b)
|
|
58 |
+{
|
2650
|
59 |
+ unsigned length = r->length();
|
|
60 |
+ if (length != b->length())
|
2315
|
61 |
+ return false;
|
2650
|
62 |
+ const UChar* d = r->characters();
|
|
63 |
+ const UChar* s = b->characters();
|
|
64 |
+ for (unsigned i = 0; i != length; ++i) {
|
2315
|
65 |
+ if (d[i] != s[i])
|
|
66 |
+ return false;
|
|
67 |
+ }
|
|
68 |
+ return true;
|
2650
|
69 |
+}
|
2315
|
70 |
|
|
71 |
}
|
|
72 |
|