Bug 1257922 - Marionette runs on ASAN fail due to fatal NS_ERROR_NOT_IMPLEMENTED JavascriptException; r?AutomatedTester draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Fri, 29 Apr 2016 17:17:36 -0400
changeset 357933 a46fb54c6ab98527ad962129d61cec0a42178a10
parent 357432 6adc822f5e27a55551faeb6c47a9bd8b0859a23b
child 519748 2f3051a3b1ecbe138e5f6331611d01b923a115b0
push id16894
push usermjzffr@gmail.com
push dateFri, 29 Apr 2016 21:34:44 +0000
reviewersAutomatedTester
bugs1257922
milestone49.0a1
Bug 1257922 - Marionette runs on ASAN fail due to fatal NS_ERROR_NOT_IMPLEMENTED JavascriptException; r?AutomatedTester MozReview-Commit-ID: KcxZLYz5prb
testing/marionette/element.js
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/Log.jsm");
 
 Cu.import("chrome://marionette/content/atom.js");
 Cu.import("chrome://marionette/content/error.js");
 
 const logger = Log.repository.getLogger("Marionette");
 
@@ -221,17 +221,21 @@ ElementManager.prototype = {
         }
         else if (val.nodeType == 1) {
           let elementId = this.addToKnownElements(val);
           result = {[element.LegacyKey]: elementId, [element.Key]: elementId};
         }
         else {
           result = {};
           for (let prop in val) {
-            result[prop] = this.wrapValue(val[prop]);
+            try {
+              result[prop] = this.wrapValue(val[prop]);
+            } catch (e if (e.result == Cr.NS_ERROR_NOT_IMPLEMENTED)) {
+              logger.debug(`Skipping ${prop} due to: ${e.message}`);
+            }
           }
         }
         break;
     }
 
     return result;
   },