Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: src/inspector/StringUtil.cc

Issue 2343733002: [inspector] enabled presubmit for inspector sub folder (Closed)
Patch Set: more fixes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/inspector/StringUtil.h" 5 #include "src/inspector/StringUtil.h"
6 6
7 #include <limits>
8
7 #include "src/inspector/protocol/Protocol.h" 9 #include "src/inspector/protocol/Protocol.h"
8 10
9 #include <limits>
10
11 namespace v8_inspector { 11 namespace v8_inspector {
12 12
13 v8::Local<v8::String> toV8String(v8::Isolate* isolate, const String16& string) { 13 v8::Local<v8::String> toV8String(v8::Isolate* isolate, const String16& string) {
14 if (string.isEmpty()) return v8::String::Empty(isolate); 14 if (string.isEmpty()) return v8::String::Empty(isolate);
15 DCHECK(string.length() < v8::String::kMaxLength); 15 DCHECK(string.length() < v8::String::kMaxLength);
16 return v8::String::NewFromTwoByte( 16 return v8::String::NewFromTwoByte(
17 isolate, reinterpret_cast<const uint16_t*>(string.characters16()), 17 isolate, reinterpret_cast<const uint16_t*>(string.characters16()),
18 v8::NewStringType::kNormal, static_cast<int>(string.length())) 18 v8::NewStringType::kNormal, static_cast<int>(string.length()))
19 .ToLocalChecked(); 19 .ToLocalChecked();
20 } 20 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 std::unique_ptr<StringBufferImpl> StringBufferImpl::adopt(String16& string) { 198 std::unique_ptr<StringBufferImpl> StringBufferImpl::adopt(String16& string) {
199 return wrapUnique(new StringBufferImpl(string)); 199 return wrapUnique(new StringBufferImpl(string));
200 } 200 }
201 201
202 StringBufferImpl::StringBufferImpl(String16& string) { 202 StringBufferImpl::StringBufferImpl(String16& string) {
203 m_owner.swap(string); 203 m_owner.swap(string);
204 m_string = toStringView(m_owner); 204 m_string = toStringView(m_owner);
205 } 205 }
206 206
207 } // namespace v8_inspector 207 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698