mirror of
				https://github.com/mozilla/gecko-dev.git
				synced 2025-11-04 02:09:05 +02:00 
			
		
		
		
	For now we were releasing object actors one by one. This would force to send an individual RDP request for each of them. The console often release all objects actors related to older console message going over the maximum limit of displayed console messages (10k). This can easily grow in a large number of actors to be released, either if console message are receiving many arguments and/or if many console are logged. We have to have one request per target as the actors could only be reached within same-thread actor. In order to prepare for ObjectFront removal, introduce a target-scoped "Objects" actor which is a singleton per Target. It will receive the new "release in bulk objects actors" method. Later, it will start implementing all the existing methods of the Object Actor in order to migrate away from having to instantiate one Object Front (notice the singular on "Object"), per inspected JS Object. On the fronted side a new Object Command is introduced in order to abstract away the RDP/Fronts work. Differential Revision: https://phabricator.services.mozilla.com/D198784
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			581 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			581 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
/* 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 {
 | 
						|
  generateActorSpec,
 | 
						|
  Arg,
 | 
						|
} = require("resource://devtools/shared/protocol.js");
 | 
						|
 | 
						|
const objectsManagerSpec = generateActorSpec({
 | 
						|
  typeName: "objects-manager",
 | 
						|
 | 
						|
  methods: {
 | 
						|
    releaseObjects: {
 | 
						|
      request: {
 | 
						|
        actorIDs: Arg(0, "array:string"),
 | 
						|
      },
 | 
						|
      response: {},
 | 
						|
    },
 | 
						|
  },
 | 
						|
});
 | 
						|
 | 
						|
exports.objectsManagerSpec = objectsManagerSpec;
 |