Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3496)

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/image_editor.js

Issue 8769036: Photo Editor async processing fix (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/image_editor/image_editor.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/image_editor.js b/chrome/browser/resources/file_manager/js/image_editor/image_editor.js
index c9de33d17425b98da264367e7893fe0a9cb2b2fa..65120531dc83ca7c941670fcb177871955dcaf80 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/image_editor.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/image_editor.js
@@ -332,7 +332,14 @@ ImageEditor.prototype.enterMode = function(mode, event) {
}
this.leaveModeGently();
+ // The above call could have caused a commit which might have initiated
+ // an asynchronous command execution. Wait for it to complete, then proceed
+ // with the mode set up.
+ this.commandQueue_.requestCurrentImage(
+ this.setUpMode_.bind(this, mode, event));
+};
+ImageEditor.prototype.setUpMode_ = function(mode, event) {
this.currentTool_ = event.target;
ImageUtil.setAttribute(this.currentTool_, 'pressed', true);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698