-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-GCC-IDB-methods-String-renamed-to-GetString.patch
163 lines (147 loc) · 7.5 KB
/
0001-GCC-IDB-methods-String-renamed-to-GetString.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
From ac8d9f9a8bb8221ca10ba4b9c858170f48867606 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <[email protected]>
Date: Mon, 5 Mar 2018 23:43:08 +0000
Subject: [PATCH] GCC: IDB methods String() renamed to GetString()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC 7.2/7.3 complains for redefining String as a method, in IDB code,
because the string accessor is named String(). So rename the accessor
to be GetString.
It seems basic.scope.hiding should imply the original code is valid,
so reported as a bug to GCC:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84709
Change-Id: Ide66104bd0953f5bb03a1bc62d7f238833ea62e7
Reviewed-on: https://chromium-review.googlesource.com/944406
Commit-Queue: José Dapena Paz <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Cr-Commit-Position: refs/heads/master@{#540986}
---
.../WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp | 10 +++++-----
.../Source/bindings/modules/v8/V8BindingForModulesTest.cpp | 2 +-
third_party/WebKit/Source/modules/exported/WebIDBKey.cpp | 2 +-
third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp | 2 +-
third_party/WebKit/Source/modules/indexeddb/IDBKey.h | 2 +-
third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h | 2 +-
.../Source/modules/indexeddb/InspectorIndexedDBAgent.cpp | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
index 6b3d0e73a3b4..4d2a5befcad9 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
@@ -68,7 +68,7 @@ v8::Local<v8::Value> ToV8(const IDBKeyPath& value,
case IDBKeyPath::kNullType:
return v8::Null(isolate);
case IDBKeyPath::kStringType:
- return V8String(isolate, value.String());
+ return V8String(isolate, value.GetString());
case IDBKeyPath::kArrayType:
return ToV8(value.Array(), creation_context, isolate);
}
@@ -97,7 +97,7 @@ v8::Local<v8::Value> ToV8(const IDBKey* key,
case IDBKey::kNumberType:
return v8::Number::New(isolate, key->Number());
case IDBKey::kStringType:
- return V8String(isolate, key->String());
+ return V8String(isolate, key->GetString());
case IDBKey::kBinaryType:
// https://w3c.github.io/IndexedDB/#convert-a-value-to-a-key
return ToV8(DOMArrayBuffer::Create(key->Binary()), creation_context,
@@ -379,7 +379,7 @@ static std::unique_ptr<IDBKey> CreateIDBKeyFromValueAndKeyPath(
}
DCHECK_EQ(key_path.GetType(), IDBKeyPath::kStringType);
- return CreateIDBKeyFromValueAndKeyPath(isolate, value, key_path.String(),
+ return CreateIDBKeyFromValueAndKeyPath(isolate, value, key_path.GetString(),
exception_state);
}
@@ -483,7 +483,7 @@ bool InjectV8KeyIntoV8Value(v8::Isolate* isolate,
DCHECK(isolate->InContext());
DCHECK_EQ(key_path.GetType(), IDBKeyPath::kStringType);
- Vector<String> key_path_elements = ParseKeyPath(key_path.String());
+ Vector<String> key_path_elements = ParseKeyPath(key_path.GetString());
// The conbination of a key generator and an empty key path is forbidden by
// spec.
@@ -569,7 +569,7 @@ bool CanInjectIDBKeyIntoScriptValue(v8::Isolate* isolate,
const IDBKeyPath& key_path) {
IDB_TRACE("canInjectIDBKeyIntoScriptValue");
DCHECK_EQ(key_path.GetType(), IDBKeyPath::kStringType);
- Vector<String> key_path_elements = ParseKeyPath(key_path.String());
+ Vector<String> key_path_elements = ParseKeyPath(key_path.GetString());
if (!key_path_elements.size())
return false;
diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModulesTest.cpp b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModulesTest.cpp
index 8f79cd7d1560..9add0d0e971d 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModulesTest.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModulesTest.cpp
@@ -118,7 +118,7 @@ void CheckKeyPathStringValue(v8::Isolate* isolate,
CheckKeyFromValueAndKeyPathInternal(isolate, value, key_path);
ASSERT_TRUE(idb_key);
ASSERT_EQ(IDBKey::kStringType, idb_key->GetType());
- ASSERT_TRUE(expected == idb_key->String());
+ ASSERT_TRUE(expected == idb_key->GetString());
}
void CheckKeyPathNumberValue(v8::Isolate* isolate,
diff --git a/third_party/WebKit/Source/modules/exported/WebIDBKey.cpp b/third_party/WebKit/Source/modules/exported/WebIDBKey.cpp
index 86015cdab573..4f6657af8fc9 100644
--- a/third_party/WebKit/Source/modules/exported/WebIDBKey.cpp
+++ b/third_party/WebKit/Source/modules/exported/WebIDBKey.cpp
@@ -56,7 +56,7 @@ WebData WebIDBKeyView::Binary() const {
}
WebString WebIDBKeyView::String() const {
- return private_->String();
+ return private_->GetString();
}
double WebIDBKeyView::Date() const {
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
index d79d8e215151..9a5e23fdc8ed 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
@@ -297,7 +297,7 @@ IDBObjectStore* IDBDatabase::createObjectStore(
}
if (auto_increment && ((key_path.GetType() == IDBKeyPath::kStringType &&
- key_path.String().IsEmpty()) ||
+ key_path.GetString().IsEmpty()) ||
key_path.GetType() == IDBKeyPath::kArrayType)) {
exception_state.ThrowDOMException(
kInvalidAccessError,
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBKey.h b/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
index d5f062867441..19d5c0222b64 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
@@ -106,7 +106,7 @@ class MODULES_EXPORT IDBKey {
return binary_;
}
- const String& String() const {
+ const String& GetString() const {
DCHECK_EQ(type_, kStringType);
return string_;
}
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
index 953c58a40a67..9f4a0532e211 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
@@ -65,7 +65,7 @@ class MODULES_EXPORT IDBKeyPath {
return array_;
}
- const String& String() const {
+ const String& GetString() const {
DCHECK_EQ(type_, kStringType);
return string_;
}
diff --git a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
index 47d3a98bf19c..06080a30718d 100644
--- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
@@ -399,7 +399,7 @@ static std::unique_ptr<KeyPath> KeyPathFromIDBKeyPath(
case IDBKeyPath::kStringType:
key_path = KeyPath::create()
.setType(KeyPath::TypeEnum::String)
- .setString(idb_key_path.String())
+ .setString(idb_key_path.GetString())
.build();
break;
case IDBKeyPath::kArrayType: {
--
2.14.3