console-messages.js (717B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 // eslint-disable-next-line mozilla/reject-some-requires 8 loader.lazyRequireGetter( 9 this, 10 "getAdHocFrontOrPrimitiveGrip", 11 "resource://devtools/client/fronts/object.js", 12 true 13 ); 14 15 module.exports = function ({ resource, targetFront }) { 16 // We might need to create fronts for each of the message arguments. 17 if (Array.isArray(resource.arguments)) { 18 resource.arguments = resource.arguments.map(arg => 19 getAdHocFrontOrPrimitiveGrip(arg, targetFront) 20 ); 21 } 22 return resource; 23 };