| OLD | NEW |
| 1 'use strict'; | 1 'use strict'; |
| 2 | 2 |
| 3 // Sometimes we need to test that using either the name, alias, or UUID | 3 // Sometimes we need to test that using either the name, alias, or UUID |
| 4 // produces the same result. The following objects help us do that. | 4 // produces the same result. The following objects help us do that. |
| 5 var generic_access = { | 5 var generic_access = { |
| 6 alias: 0x1800, | 6 alias: 0x1800, |
| 7 name: 'generic_access', | 7 name: 'generic_access', |
| 8 uuid: '00001800-0000-1000-8000-00805f9b34fb' | 8 uuid: '00001800-0000-1000-8000-00805f9b34fb' |
| 9 }; | 9 }; |
| 10 var device_name = { | 10 var device_name = { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 assert_true(!!match, event + "isn't an add-device event: " + description); | 116 assert_true(!!match, event + "isn't an add-device event: " + description); |
| 117 this._idsByName.set(match[1], match[2]); | 117 this._idsByName.set(match[1], match[2]); |
| 118 } | 118 } |
| 119 has(name) { | 119 has(name) { |
| 120 return this._idsByName.has(name); | 120 return this._idsByName.has(name); |
| 121 } | 121 } |
| 122 get(name) { | 122 get(name) { |
| 123 return this._idsByName.get(name); | 123 return this._idsByName.get(name); |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 |
| 127 function runGarbageCollection() |
| 128 { |
| 129 // Run gc() as a promise. |
| 130 return new Promise( |
| 131 function(resolve, reject) { |
| 132 GCController.collect(); |
| 133 setTimeout(resolve, 0); |
| 134 }); |
| 135 return Promise.resolve(); |
| 136 } |
| OLD | NEW |