Reminder - no plan survives breakfast.
- Feel free to send pull requests to the repo!
- Here’s a contributing guide!
- Here’s the guide for creating pull requests that smurfd used and recommends!
Today
- Bug 1529276 - resource:///modules/WindowsJumpLists.jsm still does main thread I/O
- Still hacking on WindowsJumpLists!
- Goal: I want the JumpListManager to only ever be accessed off of the main thread, so that the main thread in the parent process never has to await a lock.
- [x] Get rid of maxListItems, since it doesn't appear to be used
- [x] Get rid of isListCommitted
- [x] Make .available return a Promise
- [x] Make abortListBuild return a Promise
- [x] Make deleteActiveList return a Promise
- [x] Make SetAppUserModelId return a Promise
- [x] Add WebIDL for JumpListShortcutDescription and add populateJumpList method to JumpListBuilder.
- [x] Custom List (this is the Frequently Visited stuff) - Frequent is ENABLED by default - Recent is DISABLED by default - Don't need separators
- [x] Tasks
- [x] Update methods so that tasks and custom lists are added in the same method call. So a single populate method that takes something like...
(taskDescriptions, customTitle, customListDescriptions)
- [x] Finish the URL removal thing. Basically, if an item was removed via the shell, the next call to AppendCategory cannot include that item with the same display name - the next call needs to display something else entirely.
- [x] Implement clearJumpList (it's called deleteActiveList)
- [x] Handle the URL removal case
- [x] Handle re-entry to buildList
- [x] What was with that NS_ERROR_FAILURE we saw after caling .update() not long after startup?
- [x] See how Thunderbird uses JumpListBuilder in case there are things we need to support there.
- [x] It's a simple usage. They don't have any custom items. We should support the no-custom-items case.
- [x] How about private browsing windows? How do the icon caches work for those? How do the built lists work for those?
- [x] Make our approach preffable. Put all the old stuff back (gulp), and update WindowsJumpList to use the new mechanism on a pref.
- [ ] Figure out how to make the above testable. Then write tests.
- [ ] Let's update WinTaskbar to have a new method that can be accessed from native code (so not through XPCOM), called, like, DoCreateJumpListBuilder or something. Have it take an argument that is a reference to something that implements a JumpListManager interface. Have JumpListBuilder move that thing to the background thread - the background thread owns it. Then, in our tests, have our GTest call DoCreateJumpListBuilder, passing it something that mocks out JumpListManager. And then call it's populateJumpList method for testing.
- Goal: I want the JumpListManager to only ever be accessed off of the main thread, so that the main thread in the parent process never has to await a lock.
``` (abstract) class JumpListManager HRESULT BeginList HRESULT AddUserTasks HRESULT AppendCategory HRESULT CommitList
// Two implementations:
// 1: "Real" one that wraps one of these things:
RefPtr
// 2: "Fake" one that allows us to interrogate it for things it has been passed, for testing. class MockJumpListManager HRESULT BeginList(outparam maxitems and outparam IObjectArray) Wants to be prepared to provide an outparam which is an IObjectArray. We can do that by creating an empty collection, or a collection that returns ShellLinks. HRESULT AddUserTasks(collection) Takes an array of tasks and returns an HRESULT. We can then examine what was passed. HRESULT AppendCategory(string, collection) Takes a string and collection for the custom list. HRESULT CommitList Just returns an HRESULT. ```
We're going to be calling PopulateJumpList method on the JumpListBuilder, and then what we can do is take the returned DOM Promise and use a DOMPromiseListener to set up some lambda functions that write into some Maybe's like this, and then we spin the event loop (like that prior example) to wait until the Promise either resolves or rejects and then we assert the resolving or the rejecting.
Chat
- Join us in the Livehacking room on Mozilla’s Matrix instance! Here’s documentation on how to join. I’m only sorta monitoring the Twitch chat. A bot will try to bridge Matrix and Twitch (joc-bridgebot).
Links
- Felicia Bacon
- nbp hacks on the SpiderMonkey JS engine
- Alessandro Castellani has been streaming himself livehacking on Thunderbird
- emilio hacks on Firefox!
- Compiler Compiler - watch a Mozilla engineer hack on the SpiderMonkey JavaScript engine!
- How mconley uses Mercurial
- Andreas Kling hacks on a custom browser engine for a hand-rolled OS called SerenityOS
- The Joy of Coding: Community-Run Episode guide
- Feel free to send pull requests to the repo!
- Here’s the guide for creating pull requests that smurfd used and recommends!
- I've been mirroring the episodes to YouTube
- Code Therapy with Danny O’Brien
- Watch a developer put together a Windows game from scratch (no third-part engines) - really great explanations: https://handmadehero.org/
- /r/WatchPeopleCode for more livehacking!
Glossary
- BHR - “Background Hang Reporter”, a thing that records information about when Firefox performs poorly and sends it over Telemetry
- e10s ("ee ten ESS") - short for Electrolysis, which is the multi-process Firefox project
- CPOW ("ka-POW" or sometimes "SEE-pow") = Cross-Process Object Wrapper. See this blog post.
- Deserialize - "turn a serialized object back into the complex object”
- Serialize - "turn a complex object into something that can be represented as primitives, like strings, integers, etc
- Regression - something that made behaviour worse rather than better. Regress means to “go backward”, more or less.
- l10n - localization
- a11y - accessibility
- i18n - internationalization
- k8s - kubernetes
Feedback
- @mconley@fosstodon.org on Mastodon
- @mike_conley on Twitter
- You can chat with me on Matrix at @mconley:mozilla.org
- mikeconley.ca/blog
- mconley at mozilla dot com