PKGBUILDs/extra/chromium/0004-GCC-IDB-methods-String-renamed-to-GetString.patch

164 lines
7.5 KiB
Diff
Raw Normal View History

2018-04-18 13:06:23 +00:00
From 5ab7125656d24d876b08958f7718e2b8cbbaea1b Mon Sep 17 00:00:00 2001
2018-03-16 00:03:25 +00:00
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Mon, 5 Mar 2018 23:43:08 +0000
2018-04-18 13:06:23 +00:00
Subject: [PATCH 4/7] GCC: IDB methods String() renamed to GetString()
2018-03-16 00:03:25 +00:00
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 <jose.dapena@lge.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540986}
---
2018-04-18 13:06:23 +00:00
.../Source/bindings/modules/v8/V8BindingForModules.cpp | 10 +++++-----
.../bindings/modules/v8/V8BindingForModulesTest.cpp | 2 +-
.../WebKit/Source/modules/exported/WebIDBKey.cpp | 2 +-
.../WebKit/Source/modules/indexeddb/IDBDatabase.cpp | 2 +-
third_party/WebKit/Source/modules/indexeddb/IDBKey.h | 2 +-
.../WebKit/Source/modules/indexeddb/IDBKeyPath.h | 2 +-
.../modules/indexeddb/InspectorIndexedDBAgent.cpp | 2 +-
2018-03-16 00:03:25 +00:00
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
2018-04-18 13:06:23 +00:00
index 63e7e711431f..f9f9ce518c22 100644
2018-03-16 00:03:25 +00:00
--- 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,
2018-04-18 13:06:23 +00:00
@@ -375,7 +375,7 @@ static std::unique_ptr<IDBKey> CreateIDBKeyFromValueAndKeyPath(
2018-03-16 00:03:25 +00:00
}
DCHECK_EQ(key_path.GetType(), IDBKeyPath::kStringType);
- return CreateIDBKeyFromValueAndKeyPath(isolate, value, key_path.String(),
+ return CreateIDBKeyFromValueAndKeyPath(isolate, value, key_path.GetString(),
exception_state);
}
2018-04-18 13:06:23 +00:00
@@ -479,7 +479,7 @@ bool InjectV8KeyIntoV8Value(v8::Isolate* isolate,
2018-03-16 00:03:25 +00:00
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.
2018-04-18 13:06:23 +00:00
@@ -565,7 +565,7 @@ bool CanInjectIDBKeyIntoScriptValue(v8::Isolate* isolate,
2018-03-16 00:03:25 +00:00
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
2018-04-18 13:06:23 +00:00
index cd4a379398e6..b563e355bab7 100644
2018-03-16 00:03:25 +00:00
--- 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: {
--
2018-04-18 13:06:23 +00:00
2.17.0
2018-03-16 00:03:25 +00:00