From 8847777ab8be6792f31c2536a84e55a361612937 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Thu, 2 Jun 2016 16:38:03 -0700 Subject: [PATCH] deps: update v8_inspector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick the latest v8_inspector [1] with: * V8 5.1 compatibility * Modify parse builder templates to make coverity happy * The whitespace differences in the jinja2 sub-dependency do exist upstream. I am not sure how I missed them in the original import (ed2eac). [1] https://github.com/pavelfeldman/v8_inspector/commit/3b56732 PR-URL: https://github.com/nodejs/node/pull/7118 Reviewed-By: Anna Henningsen Reviewed-By: Myles Borins Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis Reviewed-By: Michaƫl Zasso --- .../platform/inspector_protocol/CodeGenerator.py | 6 ++++++ .../platform/inspector_protocol/TypeBuilder_h.template | 9 ++++++++- deps/v8_inspector/platform/v8_inspector/V8Compat.h | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py b/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py index 5107feb680860a..62f77a783a5b7e 100644 --- a/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py +++ b/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py @@ -180,6 +180,11 @@ def create_primitive_type_definition(type): "integer": "int", "boolean": "bool" } + defaults = { + "number": "0", + "integer": "0", + "boolean": "false" + } jsontypes = { "number": "TypeNumber", "integer": "TypeNumber", @@ -195,6 +200,7 @@ def create_primitive_type_definition(type): "raw_type": typedefs[type], "raw_pass_type": typedefs[type], "raw_return_type": typedefs[type], + "default_value": defaults[type] } type_definitions = {} diff --git a/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template b/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template index 75f67043282b63..144fcb149ffe97 100644 --- a/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template +++ b/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template @@ -187,7 +187,14 @@ public: } private: - {{type.id}}() { } + {{type.id}}() + { + {% for property in type.properties %} + {% if not(property.optional) and "default_value" in resolve_type(property) %} + m_{{property.name}} = {{resolve_type(property).default_value}}; + {%endif %} + {% endfor %} + } {% for property in type.properties %} {% if property.optional %} diff --git a/deps/v8_inspector/platform/v8_inspector/V8Compat.h b/deps/v8_inspector/platform/v8_inspector/V8Compat.h index 17d104f7736ea7..0f5b12cbb6cb07 100644 --- a/deps/v8_inspector/platform/v8_inspector/V8Compat.h +++ b/deps/v8_inspector/platform/v8_inspector/V8Compat.h @@ -7,7 +7,7 @@ #include -#if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2) +#if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1) namespace v8 { // In standalone V8 inspector this is expected to be noop anyways... @@ -23,6 +23,6 @@ class V8_EXPORT MicrotasksScope { } // namespace v8 -#endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2) +#endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1) #endif // V8Compat_h