private-properties-iterator.js (1099B)
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 const { 8 generateActorSpec, 9 Option, 10 RetVal, 11 types, 12 } = require("resource://devtools/shared/protocol.js"); 13 14 types.addDictType("privatepropertiesiterator.data", { 15 privateProperties: "array:privatepropertiesiterator.privateProperties", 16 }); 17 18 types.addDictType("privatepropertiesiterator.privateProperties", { 19 name: "string", 20 descriptor: "nullable:object.descriptor", 21 }); 22 23 const privatePropertiesIteratorSpec = generateActorSpec({ 24 typeName: "privatePropertiesIterator", 25 26 methods: { 27 slice: { 28 request: { 29 start: Option(0, "number"), 30 count: Option(0, "number"), 31 }, 32 response: RetVal("privatepropertiesiterator.data"), 33 }, 34 all: { 35 request: {}, 36 response: RetVal("privatepropertiesiterator.data"), 37 }, 38 release: { release: true }, 39 }, 40 }); 41 42 exports.privatePropertiesIteratorSpec = privatePropertiesIteratorSpec;