| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 643b33b commit f4777c7
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -180,6 +180,11 @@ def create_primitive_type_definition(type): | |||
| 180 | 180 | "integer": "int", | |
| 181 | 181 | "boolean": "bool" | |
| 182 | 182 | } | |
| 183 | + defaults = { | ||
| 184 | + "number": "0", | ||
| 185 | + "integer": "0", | ||
| 186 | + "boolean": "false" | ||
| 187 | + } | ||
| 183 | 188 | jsontypes = { | |
| 184 | 189 | "number": "TypeNumber", | |
| 185 | 190 | "integer": "TypeNumber", | |
@@ -195,6 +200,7 @@ def create_primitive_type_definition(type): | |||
| 195 | 200 | "raw_type": typedefs[type], | |
| 196 | 201 | "raw_pass_type": typedefs[type], | |
| 197 | 202 | "raw_return_type": typedefs[type], | |
| 203 | + "default_value": defaults[type] | ||
| 198 | 204 | } | |
| 199 | 205 | ||
| 200 | 206 | type_definitions = {} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -187,7 +187,14 @@ public: | |||
| 187 | 187 | } | |
| 188 | 188 | ||
| 189 | 189 | private: | |
| 190 | - {{type.id}}() { } | ||
| 190 | + {{type.id}}() | ||
| 191 | + { | ||
| 192 | + {% for property in type.properties %} | ||
| 193 | + {% if not(property.optional) and "default_value" in resolve_type(property) %} | ||
| 194 | + m_{{property.name}} = {{resolve_type(property).default_value}}; | ||
| 195 | + {%endif %} | ||
| 196 | + {% endfor %} | ||
| 197 | + } | ||
| 191 | 198 | ||
| 192 | 199 | {% for property in type.properties %} | |
| 193 | 200 | {% if property.optional %} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | 8 | #include <v8.h> | |
| 9 | 9 | ||
| 10 | - #if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2) | ||
| 10 | + #if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1) | ||
| 11 | 11 | namespace v8 { | |
| 12 | 12 | ||
| 13 | 13 | // In standalone V8 inspector this is expected to be noop anyways... | |
@@ -23,6 +23,6 @@ class V8_EXPORT MicrotasksScope { | |||
| 23 | 23 | ||
| 24 | 24 | } // namespace v8 | |
| 25 | 25 | ||
| 26 | - #endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2) | ||
| 26 | + #endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1) | ||
| 27 | 27 | ||
| 28 | 28 | #endif // V8Compat_h | |
| Back | FazBrowse Home | New Git URL |
0 commit comments