Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
index db5b534047d62eba6e04f91b3045d27314f5dc6c..2511fed997fea08cadb67a20585b8969ea65230d 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
@@ -869,7 +869,8 @@ bool isValidEnum(const String& value, |
const String& enumName, |
ExceptionState& exceptionState) { |
for (size_t i = 0; i < length; ++i) { |
- if (value == validValues[i]) |
+ // Avoid the strlen inside String::operator== (because of the StringView). |
+ if (WTF::equal(value.impl(), validValues[i])) |
return true; |
} |
exceptionState.throwTypeError("The provided value '" + value + |