@yuneta/gobj-js 7.8.0 → 7.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1132,6 +1132,14 @@ var gobjJs = (function(exports) {
1132
1132
  return;
1133
1133
  }
1134
1134
  if (gobj.__refs__ > 0) log_error(`${gobj_short_name(gobj)}: gobj DESTROYING with references: ${gobj.__refs__}`);
1135
+ if (gobj.playing) {
1136
+ log_error(`Destroying a PLAYING gobj: ${gobj_full_name(gobj)}`);
1137
+ gobj_pause(gobj);
1138
+ }
1139
+ if (gobj.running) {
1140
+ log_error(`Destroying a RUNNING gobj: ${gobj_full_name(gobj)}`);
1141
+ gobj_stop(gobj);
1142
+ }
1135
1143
  gobj.obflag |= obflag_t.obflag_destroying;
1136
1144
  let trace_creation = __yuno__ && gobj_read_bool_attr(__yuno__, "trace_creation");
1137
1145
  if (trace_creation) trace_machine(sprintf("💔💔⏩ destroying: %s", gobj_full_name(gobj)));
@@ -1141,14 +1149,6 @@ var gobjJs = (function(exports) {
1141
1149
  parent.gclass.gmt.mt_child_removed(parent, gobj);
1142
1150
  }
1143
1151
  if (gobj.gobj_flag & gobj_flag_t.gobj_flag_service) _deregister_service(gobj);
1144
- if (gobj.playing) {
1145
- log_error(`Destroying a PLAYING gobj: ${gobj_full_name(gobj)}`);
1146
- gobj_pause(gobj);
1147
- }
1148
- if (gobj.running) {
1149
- log_error(`Destroying a RUNNING gobj: ${gobj_full_name(gobj)}`);
1150
- gobj_stop(gobj);
1151
- }
1152
1152
  gobj_unsubscribe_list(gobj, gobj.dl_subscriptions, true);
1153
1153
  gobj_unsubscribe_list(gobj, gobj.dl_subscribings, true);
1154
1154
  if (parent) {
@@ -6064,7 +6064,7 @@ var gobjJs = (function(exports) {
6064
6064
  let msg_type = msg_iev_get_msg_type(gobj, iev_kw);
6065
6065
  let event_id = msg_iev_get_stack(gobj, iev_kw, IEVENT_STACK_ID);
6066
6066
  let iev_dst_role = kw_get_str(gobj, event_id, "dst_role", "");
6067
- if (iev_dst_role !== gobj_yuno_role()) {
6067
+ if (iev_dst_role.toLowerCase() !== gobj_yuno_role().toLowerCase()) {
6068
6068
  log_error(`"It's not my role, dst_role: ${iev_dst_role}, my_role: ${gobj_yuno_role()}`);
6069
6069
  return 0;
6070
6070
  }