Commit 147fd75c authored by mtomasz's avatar mtomasz Committed by Commit bot

Fix initializing volume manager in Files app.

Promise.all was called with a double array [[p1, p2]], instead of [p1, p2],
which caused completing initialization of all volumes before they are added
to the volume list, what caused failing tests in: crrev.com/985533004.

TEST=Fixes test failures in crrev.com/985533004.
BUG=None

Review URL: https://codereview.chromium.org/1020113002

Cr-Commit-Position: refs/heads/master@{#321494}
parent 6d609a9b
......@@ -675,7 +675,7 @@ VolumeManager.prototype.initialize_ = function(callback) {
// volumes in the volumeMetadataList are mounted. crbug.com/135477.
this.mountQueue_.run(function(inCallback) {
// Create VolumeInfo for each volume.
Promise.all([
Promise.all(
volumeMetadataList.map(function(volumeMetadata) {
console.debug(
'Initializing volume: ' + volumeMetadata.volumeId);
......@@ -683,8 +683,8 @@ VolumeManager.prototype.initialize_ = function(callback) {
function(volumeInfo) {
console.debug('Initialized volume: ' + volumeInfo.volumeId);
});
}.bind(this))
]).then(function() {
}.bind(this)))
.then(function() {
console.debug('Initialized all volumes.');
// Call the callback of the initialize function.
callback();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment