Bug 953184 - Do not show an error if user cancels the file chooser dialog when importing a CSS file in Devtools Style Editor. r=harth
authorSami Jaktholm <sjakthol@outlook.com>
Fri, 03 Jan 2014 09:29:05 -0500
changeset 162053 ae1a7cab0b90602ebaeaf6ab615e5d06ef6efd92
parent 162052 7b55b15c2b771517c682236d8af501dbd80c9380
child 162054 78dd63564719cdfc230724b5021a3538a1a69351
push id4165
push userryanvm@gmail.com
push dateFri, 03 Jan 2014 14:29:22 +0000
treeherderfx-team@ae1a7cab0b90 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersharth
bugs953184
milestone29.0a1
Bug 953184 - Do not show an error if user cancels the file chooser dialog when importing a CSS file in Devtools Style Editor. r=harth
browser/devtools/styleeditor/StyleEditorUI.jsm
--- a/browser/devtools/styleeditor/StyleEditorUI.jsm
+++ b/browser/devtools/styleeditor/StyleEditorUI.jsm
@@ -233,17 +233,17 @@ StyleEditorUI.prototype = {
    *        If not set a file picker will be shown.
    * @param {nsIWindow} parentWindow
    *        Optional parent window for the file picker.
    */
   _importFromFile: function(file, parentWindow)
   {
     let onFileSelected = function(file) {
       if (!file) {
-        this.emit("error", LOAD_ERROR);
+        // nothing selected
         return;
       }
       NetUtil.asyncFetch(file, (stream, status) => {
         if (!Components.isSuccessCode(status)) {
           this.emit("error", LOAD_ERROR);
           return;
         }
         let source = NetUtil.readInputStreamToString(stream, stream.available());