diff options
author | Geequlim <geequlim@gmail.com> | 2017-11-16 17:18:36 +0800 |
---|---|---|
committer | Geequlim <geequlim@gmail.com> | 2017-11-17 12:01:54 +0800 |
commit | fab66af7e99eb71ea6a2df30bea46835f749896a (patch) | |
tree | bfd8b19219ba48ca311d47f2914b7b474ce95195 /core | |
parent | c655fc7cd89d17eb858b3c99e82402de61571bb0 (diff) |
Move the remote scene tree to the scene tree dock.
Ignore all script constants in the global section of the breakpoint stack.
Check property size before send to avoid too large of data be sent.
Fix crash while clear the remote objects from the debugger.
Diffstat (limited to 'core')
-rw-r--r-- | core/script_debugger_remote.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 14f0cddb9c..56056268f2 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -609,13 +609,24 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) { Array prop; prop.push_back(pi.name); prop.push_back(pi.type); - prop.push_back(pi.hint); - if (res.is_null()) - prop.push_back(pi.hint_string); - else - prop.push_back(String("RES:") + res->get_path()); - prop.push_back(pi.usage); - prop.push_back(var); + + //only send information that can be sent.. + int len = 0; //test how big is this to encode + encode_variant(var, NULL, len); + if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size + prop.push_back(PROPERTY_HINT_OBJECT_TOO_BIG); + prop.push_back(""); + prop.push_back(pi.usage); + prop.push_back(Variant()); + } else { + prop.push_back(pi.hint); + if (res.is_null()) + prop.push_back(pi.hint_string); + else + prop.push_back(String("RES:") + res->get_path()); + prop.push_back(pi.usage); + prop.push_back(var); + } send_props.push_back(prop); } |