[Debugger] Modify the object representation in case of variables request. (#2594)
Return with the object`s toString() method instead of create a json formated string from it. It could have led to an error in previous cases (an object contains itself etc.) JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -492,14 +492,7 @@ jerry_debugger_send_scope_variables (const uint8_t *recv_buffer_p) /**< pointer
|
|||||||
|
|
||||||
jerry_debugger_scope_variable_type_t variable_type = jerry_debugger_get_variable_type (prop_value_p.value);
|
jerry_debugger_scope_variable_type_t variable_type = jerry_debugger_get_variable_type (prop_value_p.value);
|
||||||
|
|
||||||
if (variable_type == JERRY_DEBUGGER_VALUE_OBJECT)
|
property_value = ecma_op_to_string (prop_value_p.value);
|
||||||
{
|
|
||||||
property_value = ecma_builtin_json_string_from_object (prop_value_p.value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
property_value = ecma_op_to_string (prop_value_p.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!jerry_debugger_copy_variables_to_string_message (variable_type,
|
if (!jerry_debugger_copy_variables_to_string_message (variable_type,
|
||||||
ecma_get_string_from_value (property_value),
|
ecma_get_string_from_value (property_value),
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ a | Array | [1,2,3]
|
|||||||
name | type | value
|
name | type | value
|
||||||
b | Number | 10
|
b | Number | 10
|
||||||
x | Boolean | true
|
x | Boolean | true
|
||||||
user | Object | {"name":"John","age":30}
|
user | Object | [object Object]
|
||||||
m | Null | null
|
m | Null | null
|
||||||
c | Number | 10
|
c | Number | 10
|
||||||
(jerry-debugger) c
|
(jerry-debugger) c
|
||||||
|
|||||||
Reference in New Issue
Block a user