Commit 0a850b21 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Roll third_party/inspector_protocol 4d389ba..f58d066

This roll includes:

- f58d066 Add shebangs to pacify chromium presubmit error
- ecc514d Parser.cpp: Fix undefined behaviour in float conversion
- 59ca26e [inspector_protocol] Node.js is finally ready for transition..
- dd90116 [inspector_protocol] node uses script names inside own repository

Bug: 845816
Change-Id: I3e6ddda9af210e1bfa6350d0999ce2f0ee170a44
Reviewed-on: https://chromium-review.googlesource.com/1070275
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561824}
parent 5bf29200
#!/usr/bin/env python
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import convert_to_protocol_json
def main():
convert_protocol_to_json.main()
......@@ -2,7 +2,7 @@ Name: inspector protocol
Short Name: inspector_protocol
URL: https://chromium.googlesource.com/deps/inspector_protocol/
Version: 0
Revision: 4d389ba40dec55eb2b3703eb7726ac5c4fe1177d
Revision: f58d0663990a0d72a276065d0d798d26f2916f3d
License: BSD
License File: LICENSE
Security Critical: no
......
#!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import json
import os.path
import re
import sys
import pdl
# TODO(kozyatinskiy): remove with ConvertProtocolToJSON.py as soon as Node.js ready.
def main(argv):
if len(argv) < 2:
sys.stderr.write("Usage: %s <protocol.pdl> <protocol.json>\n" % sys.argv[0])
return 1
file_name = os.path.normpath(argv[0])
input_file = open(file_name, "r")
pdl_string = input_file.read()
protocol = pdl.loads(pdl_string, file_name)
input_file.close()
output_file = open(os.path.normpath(argv[1]), 'wb')
json.dump(protocol, output_file, indent=4, separators=(',', ': '))
output_file.close()
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
......@@ -425,9 +425,8 @@ std::unique_ptr<Value> buildValue(const Char* start, const Char* end, const Char
double value = charactersToDouble(tokenStart, tokenEnd - tokenStart, &ok);
if (!ok)
return nullptr;
int number = static_cast<int>(value);
if (number == value)
result = FundamentalValue::create(number);
if (value >= INT_MIN && value <= INT_MAX && static_cast<int>(value) == value)
result = FundamentalValue::create(static_cast<int>(value));
else
result = FundamentalValue::create(value);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment