git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 166a2a7fe7dd1d0ea974d47141f718a203324a31

clean up

wanderer committed on 7/3/2017, 4:59:30 PM
Parent: 679caf4c89ce01c38751eb18177edee3a845d23e

Files changed

kernel.jschanged
kernel.jsView
@@ -41,9 +41,9 @@
4141 }
4242
4343 initialize (message) {
4444 this.containerState = 'running'
45- this.run(message, true)
45+ this.run(message, 'initialize')
4646 }
4747
4848 // waits for the next message
4949 async _runNextMessage () {
@@ -72,18 +72,17 @@
7272 * @param {object} message - the message to run
7373 * @param {boolean} init - whether or not to run the intialization routine
7474 * @returns {Promise}
7575 */
76- async run (message, init = false) {
76+ async run (message, method = 'run') {
7777 let result
7878
7979 message.ports.forEach(port => this.ports._unboundPorts.add(port))
8080 message._hops++
8181
8282 if (message.constructor === DeleteMessage) {
8383 this.ports._delete(message.fromName)
8484 } else {
85- const method = init ? 'initialize' : 'run'
8685 try {
8786 result = await this.container[method](message) || {}
8887 } catch (e) {
8988 result = {

Built with git-ssb-web