Adapt String::find method via StringUtil adapter.
This is needed to insulate generated code from blink::protocol namespace from naming changes that we plan to do in the Great Blink Rename (which in particular will rename wtf::StringBuilder::find method into Find). This CL also includes roll of inspector_protocol which starts to generate code that uses the new StringUtil::find adapter method: rolling third_party/inspector to 1a7cbe8ba8fa0d622586f549a97c73d9b52efbea BUG=683447 Review-Url: https://codereview.chromium.org/2675763003 Cr-Commit-Position: refs/heads/master@{#42936}
This commit is contained in:
parent
6b6ed60155
commit
de20581ca3
@ -32,6 +32,12 @@ class StringUtil {
|
|||||||
return String::fromInteger(number);
|
return String::fromInteger(number);
|
||||||
}
|
}
|
||||||
static String fromDouble(double number) { return String::fromDouble(number); }
|
static String fromDouble(double number) { return String::fromDouble(number); }
|
||||||
|
static size_t find(const String& s, const char* needle) {
|
||||||
|
return s.find(needle);
|
||||||
|
}
|
||||||
|
static size_t find(const String& s, const String& needle) {
|
||||||
|
return s.find(needle);
|
||||||
|
}
|
||||||
static const size_t kNotFound = String::kNotFound;
|
static const size_t kNotFound = String::kNotFound;
|
||||||
static void builderAppend(StringBuilder& builder, const String& s) {
|
static void builderAppend(StringBuilder& builder, const String& s) {
|
||||||
builder.append(s);
|
builder.append(s);
|
||||||
|
2
third_party/inspector_protocol/README.v8
vendored
2
third_party/inspector_protocol/README.v8
vendored
@ -2,7 +2,7 @@ Name: inspector protocol
|
|||||||
Short Name: inspector_protocol
|
Short Name: inspector_protocol
|
||||||
URL: https://chromium.googlesource.com/deps/inspector_protocol/
|
URL: https://chromium.googlesource.com/deps/inspector_protocol/
|
||||||
Version: 0
|
Version: 0
|
||||||
Revision: 1a131872167f0f7653629326891aa3ec94417f27
|
Revision: 1a7cbe8ba8fa0d622586f549a97c73d9b52efbea
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
Security Critical: no
|
Security Critical: no
|
||||||
|
@ -276,7 +276,7 @@ DispatchResponse::Status UberDispatcher::dispatch(std::unique_ptr<Value> parsedM
|
|||||||
return DispatchResponse::kError;
|
return DispatchResponse::kError;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t dotIndex = method.find(".");
|
size_t dotIndex = StringUtil::find(method, ".");
|
||||||
if (dotIndex == StringUtil::kNotFound) {
|
if (dotIndex == StringUtil::kNotFound) {
|
||||||
if (m_fallThroughForNotFound)
|
if (m_fallThroughForNotFound)
|
||||||
return DispatchResponse::kFallThrough;
|
return DispatchResponse::kFallThrough;
|
||||||
|
Loading…
Reference in New Issue
Block a user