/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Pool } = require("devtools/shared/protocol");
/** *Createagripforthegivenobject. * *@paramobjectobject *Theobjectyouwant. *@paramNumberdepth *Depthoftheobjectcomparedtothetoplevelobject, *whenweareinspectingnestedattributes. *@paramobject[objectActorAttributes] *AnoptionalobjectwhosepropertieswillbeassignedtotheObjectActorbeingcreated. *@returnobject *Theobjectactorform,aka"grip"
*/
createObjectGrip(
object,
depth,
objectActorAttributes = {},
) { // When we are creating object actors within the thread or JS tracer actor pools, // we have some caching to prevent instantiating object actors twice for the same JS object. if (this.uniqueActorPerValue) { if (this.objectActors.has(object)) { returnthis.objectActors.get(object).form({ depth });
}
// Even if we are currently creating objects actors while being paused, // in threadActor.pauseLifetimePool, we are looking into threadLifetimePool // in case we created an actor for that object *before* pausing. if (this.threadActor.threadLifetimePool.objectActors.has(object)) { returnthis.threadActor.threadLifetimePool.objectActors.get(object).form({ depth });
}
}
// We instantiate PauseScopedObjectActor instances for any actor created by the Thread Actor const isGripForThreadActor = this == this.threadActor.threadLifetimePool || this == this.threadActor.pauseLifetimePool;
const actor = new ActorClass(this.threadActor, object, { // custom formatters are injecting their own attributes here
...objectActorAttributes,
}); this.manage(actor);
if (this.uniqueActorPerValue) { this.objectActors.set(object, actor);
}
// Pass the current depth to form method so that it can communicate it to the previewers. // So that the actor form output may change depending on the current depth of the object within the requested preview. return actor.form({ depth });
}
}
exports.ObjectActorPool = ObjectActorPool;
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.