Bug 1529247 - remove unused getPrototypesAndProperties method; r=ochameau
authoryulia <ystartsev@mozilla.com>
Tue, 26 Feb 2019 16:24:49 +0000
changeset 519084 601742636bd1a82241698e5cb86683b0a20140d7
parent 519083 b7ea35510cf18afcb86d64c050172db079912ad3
child 519085 28147c8790d3063656e4b1871e22ec10ab28b4d1
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1529247
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529247 - remove unused getPrototypesAndProperties method; r=ochameau Differential Revision: https://phabricator.services.mozilla.com/D20835
devtools/server/actors/thread.js
devtools/server/tests/unit/test_objectgrips-09.js
devtools/server/tests/unit/xpcshell.ini
devtools/shared/client/thread-client.js
--- a/devtools/server/actors/thread.js
+++ b/devtools/server/actors/thread.js
@@ -1800,57 +1800,30 @@ const ThreadActor = ActorClassWithSpec(t
     for (const actor of bpActors) {
       sourceActor.applyBreakpoint(actor);
     }
 
     this._debuggerSourcesSeen.add(source);
     return true;
   },
 
-  /**
-   * Get prototypes and properties of multiple objects.
-   */
-  onPrototypesAndProperties: function(request) {
-    const result = {};
-    for (const actorID of request.actors) {
-      // This code assumes that there are no lazily loaded actors returned
-      // by this call.
-      const actor = this.conn.getActor(actorID);
-      if (!actor) {
-        return { from: this.actorID,
-                 error: "noSuchActor" };
-      }
-      const handler = actor.prototypeAndProperties;
-      if (!handler) {
-        return { from: this.actorID,
-                 error: "unrecognizedPacketType",
-                 message: ('Actor "' + actorID +
-                           '" does not recognize the packet type ' +
-                           '"prototypeAndProperties"') };
-      }
-      result[actorID] = handler.call(actor, {});
-    }
-    return { from: this.actorID,
-             actors: result };
-  },
 });
 
 Object.assign(ThreadActor.prototype.requestTypes, {
   "attach": ThreadActor.prototype.onAttach,
   "detach": ThreadActor.prototype.onDetach,
   "reconfigure": ThreadActor.prototype.onReconfigure,
   "resume": ThreadActor.prototype.onResume,
   "clientEvaluate": ThreadActor.prototype.onClientEvaluate,
   "frames": ThreadActor.prototype.onFrames,
   "interrupt": ThreadActor.prototype.onInterrupt,
   "eventListeners": ThreadActor.prototype.onEventListeners,
   "releaseMany": ThreadActor.prototype.onReleaseMany,
   "sources": ThreadActor.prototype.onSources,
   "threadGrips": ThreadActor.prototype.onThreadGrips,
-  "prototypesAndProperties": ThreadActor.prototype.onPrototypesAndProperties,
   "skipBreakpoints": ThreadActor.prototype.onSkipBreakpoints,
 });
 
 exports.ThreadActor = ThreadActor;
 
 /**
  * Creates a PauseActor.
  *
deleted file mode 100644
--- a/devtools/server/tests/unit/test_objectgrips-09.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/**
- * This tests exercises getProtypesAndProperties message accepted
- * by a thread actor.
- */
-
-Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-});
-
-add_task(threadClientTest(async ({ threadClient, debuggee, client }) => {
-  return new Promise(resolve => {
-    threadClient.addOneTimeListener("paused", function(event, packet) {
-      const args = packet.frame.arguments;
-
-      threadClient.getPrototypesAndProperties(
-        [args[0].actor, args[1].actor], function(response) {
-          const obj1 = response.actors[args[0].actor];
-          const obj2 = response.actors[args[1].actor];
-          Assert.equal(obj1.ownProperties.x.configurable, true);
-          Assert.equal(obj1.ownProperties.x.enumerable, true);
-          Assert.equal(obj1.ownProperties.x.writable, true);
-          Assert.equal(obj1.ownProperties.x.value, 10);
-
-          Assert.equal(obj1.ownProperties.y.configurable, true);
-          Assert.equal(obj1.ownProperties.y.enumerable, true);
-          Assert.equal(obj1.ownProperties.y.writable, true);
-          Assert.equal(obj1.ownProperties.y.value, "kaiju");
-
-          Assert.equal(obj2.ownProperties.z.configurable, true);
-          Assert.equal(obj2.ownProperties.z.enumerable, true);
-          Assert.equal(obj2.ownProperties.z.writable, true);
-          Assert.equal(obj2.ownProperties.z.value, 123);
-
-          Assert.ok(obj1.prototype != undefined);
-          Assert.ok(obj2.prototype != undefined);
-
-          threadClient.resume(resolve);
-        });
-    });
-
-    debuggee.eval(function stopMe(arg1) {
-      debugger;
-    }.toString());
-    debuggee.eval("stopMe({ x: 10, y: 'kaiju'}, { z: 123 })");
-  });
-}));
-
--- a/devtools/server/tests/unit/xpcshell.ini
+++ b/devtools/server/tests/unit/xpcshell.ini
@@ -155,17 +155,16 @@ skip-if = true # breakpoint sliding is n
 [test_objectgrips-01.js]
 [test_objectgrips-02.js]
 [test_objectgrips-03.js]
 [test_objectgrips-04.js]
 [test_objectgrips-05.js]
 [test_objectgrips-06.js]
 [test_objectgrips-07.js]
 [test_objectgrips-08.js]
-[test_objectgrips-09.js]
 [test_objectgrips-10.js]
 [test_objectgrips-11.js]
 [test_objectgrips-12.js]
 [test_objectgrips-13.js]
 [test_objectgrips-14.js]
 [test_objectgrips-15.js]
 [test_objectgrips-16.js]
 [test_objectgrips-17.js]
--- a/devtools/shared/client/thread-client.js
+++ b/devtools/shared/client/thread-client.js
@@ -700,27 +700,14 @@ ThreadClient.prototype = {
     if (form.actor in this._threadGrips) {
       return this._threadGrips[form.actor];
     }
 
     this._threadGrips[form.actor] = new SourceClient(this, form);
     return this._threadGrips[form.actor];
   },
 
-  /**
-   * Request the prototype and own properties of mutlipleObjects.
-   *
-   * @param onResponse function
-   *        Called with the request's response.
-   * @param actors [string]
-   *        List of actor ID of the queried objects.
-   */
-  getPrototypesAndProperties: DebuggerClient.requester({
-    type: "prototypesAndProperties",
-    actors: arg(0),
-  }),
-
   events: ["newSource", "progress"],
 };
 
 eventSource(ThreadClient.prototype);
 
 module.exports = ThreadClient;