Remove backward compatibility method getDescription from devtools/client/fronts/device.js
Categories
(DevTools :: Shared Components, task, P3)
Tracking
(firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: jdescottes, Assigned: vaga)
References
Details
(Keywords: good-first-bug)
Attachments
(1 file)
The following method was only needed when connecting to FF69 or older, which are no longer supported.
/**
* Handle backward compatibility for getDescription.
* Can be removed on Firefox 70 reaches the release channel.
*/
async getDescription() {
const description = await super.getDescription();
// Backward compatibility when connecting for Firefox 69 or older.
if (typeof description.canDebugServiceWorkers === "undefined") {
description.canDebugServiceWorkers = !description.isMultiE10s;
}
return description;
}
The method can be removed. Bug 1664767 will update the same file, better wait for the other bug to land to avoid conflicts. Setting as good first bug.
Assignee | ||
Comment 1•4 years ago
|
||
I can continue to clean this file. Can you assign me?
Reporter | ||
Comment 2•4 years ago
|
||
Sure Fabien! Thanks for helping with this cleanup (and sorry about the delay).
Assigning this to you.
Assignee | ||
Comment 3•4 years ago
|
||
Do I have to remove entries in spec file?
https://searchfox.org/mozilla-central/source/devtools/shared/specs/device.js#11-15
Finally, DeviceFront and deviceSpec seem to be empty and useless. What do I have to do?
Assignee | ||
Comment 4•4 years ago
|
||
My bad, deviceSpec
is used by DeviceActor
(https://searchfox.org/mozilla-central/source/devtools/server/actors/device.js#25)
So, only DeviceFront
seems to be empty and useless and doesn't implement spec methods of deviceSpec
.
Reporter | ||
Comment 5•4 years ago
|
||
Correct, and even if this front currently doesn't provide any added value, it is still required by the framework.
Let's keep it for now :)
Assignee | ||
Comment 6•4 years ago
|
||
Comment 8•4 years ago
|
||
Backed out changeset 9163c138b0ee (bug 1672433) for test_front_destroy failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/a769f9f08c63619a7747b97cf0e7a874cdd09f0e
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=319766601&repo=autoland&lineNumber=3434
[task 2020-10-26T16:38:16.420Z] 16:38:16 INFO - TEST-START | devtools/server/tests/xpcshell/test_front_destroy.js
[task 2020-10-26T16:38:16.585Z] 16:38:16 WARNING - TEST-UNEXPECTED-FAIL | devtools/server/tests/xpcshell/test_front_destroy.js | xpcshell return code: 0
[task 2020-10-26T16:38:16.585Z] 16:38:16 INFO - TEST-INFO took 163ms
[task 2020-10-26T16:38:16.585Z] 16:38:16 INFO - >>>>>>>
[task 2020-10-26T16:38:16.585Z] 16:38:16 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-10-26T16:38:16.585Z] 16:38:16 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-10-26T16:38:16.586Z] 16:38:16 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-10-26T16:38:16.587Z] 16:38:16 INFO - running event loop
[task 2020-10-26T16:38:16.587Z] 16:38:16 INFO - devtools/server/tests/xpcshell/test_front_destroy.js | Starting test
[task 2020-10-26T16:38:16.588Z] 16:38:16 INFO - (xpcshell/head.js) | test test pending (2)
[task 2020-10-26T16:38:16.588Z] 16:38:16 INFO - "Create and connect the DevToolsClient"
[task 2020-10-26T16:38:16.588Z] 16:38:16 INFO - (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2020-10-26T16:38:16.589Z] 16:38:16 INFO - "Get the device front and check calling getDescription() on it"
[task 2020-10-26T16:38:16.590Z] 16:38:16 INFO - TEST-PASS | devtools/server/tests/xpcshell/test_front_destroy.js | test - [test : 28] Check that the getDescription() method returns a valid response. - true == true
[task 2020-10-26T16:38:16.591Z] 16:38:16 INFO - "Destroy the device front and try calling getDescription again"
[task 2020-10-26T16:38:16.591Z] 16:38:16 INFO - Unexpected exception Error: Can not send request 'getDescription' because front 'device' is already destroyed. at resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:28
[task 2020-10-26T16:38:16.591Z] 16:38:16 INFO - generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:28:15
[task 2020-10-26T16:38:16.591Z] 16:38:16 INFO - test@/builds/worker/workspace/build/tests/xpcshell/tests/devtools/server/tests/xpcshell/test_front_destroy.js:36:11
[task 2020-10-26T16:38:16.591Z] 16:38:16 INFO - _do_main@/builds/worker/workspace/build/tests/xpcshell/head.js:248:6
[task 2020-10-26T16:38:16.592Z] 16:38:16 INFO - _execute_test@/builds/worker/workspace/build/tests/xpcshell/head.js:577:5
[task 2020-10-26T16:38:16.593Z] 16:38:16 INFO - @-e:1:1
[task 2020-10-26T16:38:16.593Z] 16:38:16 INFO - exiting test
[task 2020-10-26T16:38:16.594Z] 16:38:16 INFO - <<<<<<<
[task 2020-10-26T16:38:16.596Z] 16:38:16 INFO - INFO | Result summary:
[task 2020-10-26T16:38:16.596Z] 16:38:16 INFO - INFO | Passed: 624
[task 2020-10-26T16:38:16.596Z] 16:38:16 WARNING - INFO | Failed: 1
[task 2020-10-26T16:38:16.596Z] 16:38:16 WARNING - One or more unittests failed.
[task 2020-10-26T16:38:16.596Z] 16:38:16 INFO - INFO | Todo: 0
[task 2020-10-26T16:38:16.596Z] 16:38:16 INFO - INFO | Retried: 1
[task 2020-10-26T16:38:16.596Z] 16:38:16 INFO - SUITE-END | took 600s
[task 2020-10-26T16:38:16.596Z] 16:38:16 INFO - Node moz-http2 server shutting down ...
[task 2020-10-26T16:38:16.599Z] 16:38:16 INFO - http3Server server shutting down ...
[task 2020-10-26T16:38:16.750Z] 16:38:16 ERROR - Return code: 1
[task 2020-10-26T16:38:16.750Z] 16:38:16 INFO - TinderboxPrint: xpcshell-xpcshell<br/>624/<em class="testfail">1</em>/0
[task 2020-10-26T16:38:16.751Z] 16:38:16 WARNING - # TBPL FAILURE #
[task 2020-10-26T16:38:16.751Z] 16:38:16 WARNING - setting return code to 2
[task 2020-10-26T16:38:16.752Z] 16:38:16 WARNING - The xpcshell suite: xpcshell ran with return status: FAILURE
Assignee | ||
Comment 9•4 years ago
|
||
Before, getDescription
of DeviceFront
returned always a promise (async function). (https://searchfox.org/mozilla-central/rev/25d5a4443a7e13cfa58eff38f1faa5e69f0b170f/devtools/client/fronts/device.js#27)
Now, it use getDescription
of FrontClassWithSpec
and throw the error before to return the promise. (https://searchfox.org/mozilla-central/source/devtools/shared/protocol/Front/FrontClassWithSpec.js#28)
I sent a new patch.
I don't know if I have to comment here or in moz-phab.
Reporter | ||
Comment 10•4 years ago
|
||
(In reply to Fabien Casters from comment #9)
I don't know if I have to comment here or in moz-phab.
There is no strict process. Commenting on bugzilla is what we do most of the time. Your comment is helpful and will make it easier to understand why the patch was backed out in case anyone stumbles on this in the future.
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
bugherder |
Description
•