emit immutable

This commit is contained in:
DD Liu 2017-05-22 17:31:53 -04:00
parent 48c51ab2ec
commit acdc783f27

View file

@ -706,11 +706,10 @@ class Runtime extends EventEmitter {
} }
if (!this._prevMonitorState.equals(this._monitorState)) { if (!this._prevMonitorState.equals(this._monitorState)) {
const monitorStateObj = this._monitorState.toJS(); this.emit(Runtime.MONITORS_UPDATE, this._monitorState);
this.emit(Runtime.MONITORS_UPDATE, Object.keys(monitorStateObj).map(key => monitorStateObj[key]));
}
this._prevMonitorState = this._monitorState; this._prevMonitorState = this._monitorState;
} }
}
/** /**
* Get the number of threads in the given array that are monitor threads (threads * Get the number of threads in the given array that are monitor threads (threads