OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 "platform/inspector_protocol/Parser.h" | |
6 | |
7 #include "platform/inspector_protocol/String16.h" | |
8 #include "platform/inspector_protocol/Values.h" | |
9 | |
10 namespace blink { | 5 namespace blink { |
11 namespace protocol { | 6 namespace protocol { |
12 | 7 |
13 namespace { | 8 namespace { |
14 | 9 |
15 const int stackLimit = 1000; | 10 const int stackLimit = 1000; |
16 | 11 |
17 enum Token { | 12 enum Token { |
18 ObjectBegin, | 13 ObjectBegin, |
19 ObjectEnd, | 14 ObjectEnd, |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 485 |
491 std::unique_ptr<Value> parseJSON(const String16& json) | 486 std::unique_ptr<Value> parseJSON(const String16& json) |
492 { | 487 { |
493 if (json.isEmpty()) | 488 if (json.isEmpty()) |
494 return nullptr; | 489 return nullptr; |
495 return parseJSONInternal(json.characters16(), json.length()); | 490 return parseJSONInternal(json.characters16(), json.length()); |
496 } | 491 } |
497 | 492 |
498 } // namespace protocol | 493 } // namespace protocol |
499 } // namespace blink | 494 } // namespace blink |
OLD | NEW |