Bug 1257922 - Marionette runs on ASAN fail due to fatal NS_ERROR_NOT_IMPLEMENTED JavascriptException; r?AutomatedTester
MozReview-Commit-ID: KcxZLYz5prb
--- 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;
},