Commit 0e43c392 authored by dgozman's avatar dgozman Committed by Commit bot

[inspector] Roll inspector_protocol to c65b17da8a32bc6ab25b4ebbef1008f23c69e7d1.

Roll includes:
- [inspector_protocol] Move imported/exported information to config options.
- [inspector_protocol] Restructure generator code.

BUG=chromium:664683

Review-Url: https://codereview.chromium.org/2553513002
Cr-Commit-Position: refs/heads/master@{#41494}
parent d0eb8f91
......@@ -6,14 +6,17 @@
"namespace": ["v8_inspector", "protocol"],
"options": [
{
"domain": "Schema"
"domain": "Schema",
"exported": ["Domain"]
},
{
"domain": "Runtime",
"async": ["evaluate", "awaitPromise", "callFunctionOn", "runScript"]
"async": ["evaluate", "awaitPromise", "callFunctionOn", "runScript"],
"exported": ["StackTrace", "RemoteObject"]
},
{
"domain": "Debugger"
"domain": "Debugger",
"exported": ["SearchMatch", "paused.reason"]
},
{
"domain": "Console"
......
......@@ -9,7 +9,6 @@
"id": "Domain",
"type": "object",
"description": "Description of the protocol domain.",
"exported": true,
"properties": [
{ "name": "name", "type": "string", "description": "Domain name." },
{ "name": "version", "type": "string", "description": "Domain version." }
......@@ -51,7 +50,6 @@
"id": "RemoteObject",
"type": "object",
"description": "Mirror object referencing original JavaScript object.",
"exported": true,
"properties": [
{ "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
{ "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error", "proxy", "promise", "typedarray"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
......@@ -200,7 +198,6 @@
"id": "StackTrace",
"type": "object",
"description": "Call frames for assertions or error messages.",
"exported": true,
"properties": [
{ "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." },
{ "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." },
......@@ -468,7 +465,6 @@
"id": "SearchMatch",
"type": "object",
"description": "Search match for resource.",
"exported": true,
"properties": [
{ "name": "lineNumber", "type": "number", "description": "Line number in resource content." },
{ "name": "lineContent", "type": "string", "description": "Line with match content." }
......@@ -729,7 +725,7 @@
"name": "paused",
"parameters": [
{ "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
{ "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "other" ], "description": "Pause reason.", "exported": true },
{ "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "other" ], "description": "Pause reason." },
{ "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." },
{ "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs" },
{ "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }
......
......@@ -20,7 +20,7 @@ namespace API {
// ------------- Enums.
{% for type in domain.types %}
{% if ("enum" in type) and type.exported %}
{% if ("enum" in type) and protocol.is_exported(domain.domain, type.id) %}
namespace {{type.id}}Enum {
{% for literal in type.enum %}
......@@ -31,7 +31,7 @@ namespace {{type.id}}Enum {
{% endfor %}
{% for command in join_arrays(domain, ["commands", "events"]) %}
{% for param in join_arrays(command, ["parameters", "returns"]) %}
{% if ("enum" in param) and (param.exported) %}
{% if ("enum" in param) and protocol.is_exported(domain.domain, command.name + "." + param.name) %}
namespace {{command.name | to_title_case}} {
namespace {{param.name | to_title_case}}Enum {
......@@ -46,7 +46,7 @@ namespace {{param.name | to_title_case}}Enum {
// ------------- Types.
{% for type in domain.types %}
{% if not (type.type == "object") or not ("properties" in type) or not (type.exported) %}{% continue %}{% endif %}
{% if not (type.type == "object") or not ("properties" in type) or not protocol.is_exported(domain.domain, type.id) %}{% continue %}{% endif %}
class {{config.exported.export_macro}} {{type.id}} {
public:
......
......@@ -18,7 +18,7 @@
namespace {{namespace}} {
{% endfor %}
{% for type in domain.types %}
{% if not (type.type == "object") or not ("properties" in type) or not (type.exported) %}{% continue %}{% endif %}
{% if not (type.type == "object") or not ("properties" in type) or not protocol.is_imported(domain.domain, type.id) %}{% continue %}{% endif %}
template<>
struct ValueConversions<{{"::".join(config.imported.namespace)}}::{{domain.domain}}::API::{{type.id}}> {
......
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