Bug 1513888 - Remove evaluateJSAsync trait; r=yulia.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Thu, 13 Dec 2018 15:45:40 +0000
changeset 510395 265e45e19268cc732255cb731e2d44d1fff6aec2
parent 510394 6e8a03d07b1279f236c5cbb41930a899a2ee50f5
child 510396 bfca182e8a80c68fc78b3dde6626fa53fec50cc9
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyulia
bugs1513888
milestone66.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 1513888 - Remove evaluateJSAsync trait; r=yulia. The trait was added in 37 to handle older server, but given how old it is now, I think it's safe to remove it. Differential Revision: https://phabricator.services.mozilla.com/D14424
devtools/server/actors/webconsole.js
devtools/shared/webconsole/client.js
--- a/devtools/server/actors/webconsole.js
+++ b/devtools/server/actors/webconsole.js
@@ -88,17 +88,16 @@ function WebConsoleActor(connection, par
             this._onChangedToplevelDocument);
   this._onObserverNotification = this._onObserverNotification.bind(this);
   if (this.parentActor.isRootActor) {
     Services.obs.addObserver(this._onObserverNotification,
                              "last-pb-context-exited");
   }
 
   this.traits = {
-    evaluateJSAsync: true,
     transferredResponseSize: true,
     selectedObjectActor: true, // 44+
     fetchCacheDescriptor: true,
   };
 
   if (this.dbg.replaying && !isWorker) {
     this.dbg.onConsoleMessage = this.onReplayingMessage.bind(this);
   }
--- a/devtools/shared/webconsole/client.js
+++ b/devtools/shared/webconsole/client.js
@@ -300,21 +300,16 @@ WebConsoleClient.prototype = {
     return this._client.request(packet, onResponse);
   },
 
   /**
    * Evaluate a JavaScript expression asynchronously.
    * See evaluateJS for parameter and response information.
    */
   evaluateJSAsync: function(string, onResponse, options = {}) {
-    // Pre-37 servers don't support async evaluation.
-    if (!this.traits.evaluateJSAsync) {
-      return this.evaluateJS(string, onResponse, options);
-    }
-
     const packet = {
       to: this._actor,
       type: "evaluateJSAsync",
       text: string,
       bindObjectActor: options.bindObjectActor,
       frameActor: options.frameActor,
       url: options.url,
       selectedNodeActor: options.selectedNodeActor,