Closed
Bug 937197
Opened 11 years ago
Closed 10 years ago
add a "requestTypes" RDP request
Categories
(DevTools :: Debugger, defect, P3)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 29
People
(Reporter: fitzgen, Assigned: rpl)
References
Details
(Whiteboard: [good first bug][mentor=nfitzgerald@mozilla.com][lang=js][debugger-docs-needed])
Attachments
(1 file, 1 obsolete file)
3.53 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
Every actor should accept "requestTypes" requests and return a packet of the form { from: actorID, requestTypes: [...] } where requestTypes is an array of string request types. This will help us with feature detection when dealing with slightly different versions of the protocol, and helps make our protocol a little more self documenting. We shouldn't need to actually implement onRequestTypes for every actor, though. The server's main onPacket method could handle this for everyone: http://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/main.js#969
Reporter | ||
Comment 1•11 years ago
|
||
More info for any one who wants to pick up this bug: General info on how to hack on our tools: https://wiki.mozilla.org/DevTools/Hacking The test suite you'll be running: https://wiki.mozilla.org/DevTools/Hacking#xpcshell_Tests You'll need to add a new xpcshell test: 1. Create a file "test_requestTypes.js" in toolkit/devtools/server/tests/unit/ 2. Add it to the xpcshell.ini in the same directory 3. Do an incremental build 4. Run the tests again to see if it passes/fails
Reporter | ||
Comment 2•11 years ago
|
||
Clarification: the request packet form should be: { to: actorID, type "requestTypes" } Also, you should be able to get a list of an actor's request types by doing: Object.keys(actor.requestTypes)
Reporter | ||
Updated•11 years ago
|
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Comment 3•11 years ago
|
||
Hello Nick, I am willing to try to fix this bug. So I pick it up.
Updated•11 years ago
|
Assignee: nobody → pylaurent1314
Reporter | ||
Comment 4•11 years ago
|
||
Great! If you have any questions, feel free to ask me either on this bug or on irc! Here is an overview of our remote debugging protocol (RDP): https://wiki.mozilla.org/Remote_Debugging_Protocol
Comment 5•11 years ago
|
||
Thank you.
Comment 6•11 years ago
|
||
Hi Nick. Should I run the requestTypes for all acotrs? Or I just need to pick on to test?
Comment 7•11 years ago
|
||
Oh, sorry. I mean whether I should run the requestTypes test for all actors.
Reporter | ||
Comment 8•11 years ago
|
||
You don't need to test this for every actor, but you should probably test a couple different ones. Maybe the ThreadActor and the ObjectActor.
Comment 9•11 years ago
|
||
Testing an actor that uses protocol.js would be good as well. Not sure if we have any that can be tested with xpcshell tests, but chrome mochitests will work.
Reporter | ||
Comment 10•10 years ago
|
||
Hi Peiyong! Are you still actively working on this? I only ask because there hasn't been much movement here lately and I have another contributor who expressed interest in this particular bug. If you are still working on this, a quick confirmation of that fact would be awesome. If you aren't, then I will re-assign to the other contributor. Thanks!
Flags: needinfo?(pylaurent1314)
Comment 11•10 years ago
|
||
I am sorry. I am not working on this bug.
Assignee: pylaurent1314 → nobody
Flags: needinfo?(pylaurent1314)
Reporter | ||
Comment 12•10 years ago
|
||
(In reply to Peiyong Lin[:lpy](UTC-8) from comment #11) > I am sorry. I am not working on this bug. No problem :) Thanks for unassigning yourself.
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → luca.greco
Assignee | ||
Comment 13•10 years ago
|
||
In this first revision of the patch: - add "requestTypes RDP request" for any existent actor (handled in the toolkit/devtools/server/main.js module just after the check for actor existency) - add a new xpcshell-test unit (test_requestTypes.js), currently it checks the success test-case on the chrome debugger actor
Attachment #8355820 -
Flags: review?(nfitzgerald)
Reporter | ||
Comment 14•10 years ago
|
||
Comment on attachment 8355820 [details] [diff] [review] rev0 - handle requestTypes RDP request for any existent RDP actor, added success test case (xpcshell-test unit) Review of attachment 8355820 [details] [diff] [review]: ----------------------------------------------------------------- LGTM! Thanks, Luca. r+ with small comments below addressed. ::: toolkit/devtools/server/tests/unit/test_requestTypes.js @@ +10,5 @@ > + var calls = []; > + > + calls.push(test_existent_actor(aClient, anActor)); > + > + promise.all.apply(null, calls).then(() => { Should be able to just do: promise.all(calls).then(...) @@ +22,5 @@ > +{ > + let deferred = promise.defer(); > + > + aClient.request({ to: anActor, type: "requestTypes" }, function (aResponse) { > + do_check_eq(typeof aResponse.requestTypes.length, "number"); What is the point of checking that |length| is a number? Making sure that |requestTypes| is an array? If that is what we are going for, I'd replace the check with: Array.isArray(aResponse.requestTypes)
Attachment #8355820 -
Flags: review?(nfitzgerald) → review+
Assignee | ||
Comment 15•10 years ago
|
||
Attachment #8355820 -
Attachment is obsolete: true
Attachment #8356169 -
Flags: review?(nfitzgerald)
Assignee | ||
Updated•10 years ago
|
Attachment #8356169 -
Attachment description: applied suggested tweaks to test_requestTypes.js xpcshell test in rev0 → rev1 - applied suggested tweaks to test_requestTypes.js xpcshell test in rev0
Reporter | ||
Comment 16•10 years ago
|
||
(In reply to Luca Greco from comment #15) > Created attachment 8356169 [details] [diff] [review] > rev1 - applied suggested tweaks to test_requestTypes.js xpcshell test in rev0 Thanks! In the future, when I say "r+ with blah blah", that means you don't need to flag me for review again. You can just upload the new patch and add the "checkin-needed" keyword.
Reporter | ||
Updated•10 years ago
|
Attachment #8356169 -
Flags: review?(nfitzgerald) → review+
Reporter | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 17•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/05d387f1dc78
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [good first bug][mentor=nfitzgerald@mozilla.com][lang=js][debugger-docs-needed] → [good first bug][mentor=nfitzgerald@mozilla.com][lang=js][debugger-docs-needed][fixed-in-fx-team]
Comment 18•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/05d387f1dc78
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug][mentor=nfitzgerald@mozilla.com][lang=js][debugger-docs-needed][fixed-in-fx-team] → [good first bug][mentor=nfitzgerald@mozilla.com][lang=js][debugger-docs-needed]
Target Milestone: --- → Firefox 29
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•