RSSAmplifier

Blog

Aaron Klotz's Software Blog

dblohm7.caRSS feed ↗20 posts

Latest posts

DnsQueryEx Needs Love

Recently I’ve been doing some work with DnsQueryEx , but unfortunately this has been less than pleasant. Not only are there errors in its documentation, but the API itself contains a bug that IMHO should never have made it to release. Like many other Win32 APIs, DnsQueryEx is an asynchronous interface that also supports being called synchronously. Whether their completion mechanism uses an…

All Good Things...

Today is my final day as an employee of Mozilla Corporation. My first patch landed in Firefox 19, and my final patch as an employee has landed in Nightly for Firefox 93. I’ll be moving on to something new in a few weeks time, but for now, I’d just like to say this: My time at Mozilla has made me into a better software developer, a better leader, and more importantly, a better person.…

2019 Roundup: Part 1 - Porting the DLL Interceptor to AArch64

In my continuing efforts to get caught up on discussing my work, I am now commencing a roundup for 2019. I think I am going to structure this one slightly differently from the last one: I am going to try to segment this roundup by project. Here is an index of all the entries in this series: Part 1 - Porting the DLL Interceptor to AArch64 (this post) Porting the DLL Interceptor to AArch64 During…

2018 Roundup: H2 - Preparing to Enable the Launcher Process by Default

This is the fifth post in my “2018 Roundup” series. For an index of all entries, please see my blog entry for Q1 . Yes, you are reading the dates correctly: I am posting this over two years after I began this series. I am trying to get caught up on documenting my past work! CI and Developer Tooling Given that the launcher process completely changes how our Win32 Firefox builds start, I…

2018 Roundup: Q2, Part 3 - Fleshing Out the Launcher Process

This is the fourth post in my “2018 Roundup” series. For an index of all entries, please see my blog entry for Q1 . Yes, you are reading the dates correctly: I am posting this nearly two years after I began this series. I am trying to get caught up on documenting my past work! Once I had landed the skeletal implementation of the launcher process, it was time to start making it do…

2018 Roundup: Q2, Part 2 - Implementing a Skeletal Launcher Process

This is the third post in my “2018 Roundup” series. For an index of all entries, please see my blog entry for Q1 . Yes, you are reading the dates correctly: I am posting this nearly two years after I began this series. I am trying to get caught up on documenting my past work! One of the things I added to Firefox for Windows was a new process called the “launcher process.”…

Coming Around Full Circle

One thing about me that most Mozillians don’t know is that, when I first applied to work at MoCo, I had applied to work on the mobile platform. When all was said and done, it was decided at the time that I would be a better fit for an opening on Taras Glek’s platform performance team. My first day at Mozilla was October 15, 2012 — I will be celebrating my seventh anniversary at…

2018 Roundup: Q2, Part 1 - Refactoring the DLL Interceptor

This is the second post in my “2018 Roundup” series. For an index of all entries, please see my blog entry for Q1 . As I have alluded to previously , Gecko includes a Detours-style API hooking mechanism for Windows. In Gecko, this code is referred to as the “DLL Interceptor.” We use the DLL interceptor to instrument various functions within our own processes. As a…

2018 Roundup: Q1 - Learning More About DLLs Injected Into Firefox

I had a very busy 2018. So busy, in fact, that I have not been able to devote any time to actually discussing what I worked on! I had intended to write these posts during the end of December, but a hardware failure delayed that until the new year. Alas, here we are in 2019, and I am going to do a series of retrospectives on last year’s work, broken up by quarter. Here is an index of all the…

Legacy Firefox Extensions and "Userspace"

This week’s release of Firefox Quantum has prompted all kinds of feedback, both positive and negative. That is not surprising to anybody — any software that has a large number of users is going to be a topic for discussion, especially when the release in question is undoubtedly a watershed. While I have previously blogged about the transition to WebExtensions, now that we have actually…

Win32 Gotchas

For the second time since I have been at Mozilla I have encountered a situation where hooks are called for notifications of a newly created window, but that window has not yet been initialized properly, causing the hooks to behave badly. The first time was inside our window neutering code in IPC, while the second time was in our accessibility code. Every time I have seen this, there is code that…

Why I Prefer Using CRITICAL_SECTIONs for Mutexes in Windows Nightly Builds

In the past I have argued that our Nightly builds, both debug and release, should use CRITICAL_SECTION s (with full debug info) for our implementation of mozilla::Mutex . I’d like to illustrate some reasons why this is so useful. They enable more utility in WinDbg extensions Every time you initialize a CRITICAL_SECTION , Windows inserts the CS’s debug info into a process-wide linked…

Asynchronous Plugin Initialization: Requiem

My colleague bsmedberg njn is going to be removing asynchronous plugin initialization in bug 1352575 . Sadly the feature never became solid enough to remain enabled on release, so we cut our losses and cancelled the project early in 2016. Now that code is just a bunch of dead weight. With the deprecation of non-Flash NPAPI plugins in Firefox 52, our developers are now working on simplifying the…

New Team, New Project

In February of this year I switched teams: After 3+ years on Mozilla’s Performance Team, and after having the word “performance” in my job description in some form or another for several years prior to that, I decided that it was time for me to move on to new challenges. Fortunately the Platform org was willing to have me set up shop under the (e10s|sandboxing|platform…

New Mozdbgext Command: !iat

As of today I have added a new command to mozdbgext : !iat . The syntax is pretty simple: !iat <hexadecimal address> This address shouldn&rsquo;t be just any pointer; it should be the address of an entry in the current module&rsquo;s import address table (IAT). These addresses are typically very identifiable by the _imp_ prefix in their symbol names. The purpose of this extension is to look up the…

Announcing Mozdbgext

A well-known problem at Mozilla is that, while most of our desktop users run Windows, most of Mozilla&rsquo;s developers do not. There are a lot of problems that result from that, but one of the most frustrating to me is that sometimes those of us that actually use Windows for development find ourselves at a disadvantage when it comes to tooling or other productivity enhancers. In many ways this…

Bugs From Hell: Injected Third-party Code + Detours = a Bad Time

Happy New Year! I&rsquo;m finally getting &lsquo;round to writing about a nasty bug that I had to spend a bunch of time with in Q4 2015. It&rsquo;s one of the more challenging problems that I&rsquo;ve had to break and I&rsquo;ve been asked a lot of questions about it. I&rsquo;m talking about bug 1218473 . How This All Began In bug 1213567 I had landed a patch to intercept calls to CreateWindowEx .…

On WebExtensions

There has been enough that has been said over the past week about WebExtensions that I wasn&rsquo;t sure if I wanted to write this post. As usual, I can&rsquo;t seem to help myself. Note the usual disclaimer that this is my personal opinion. Further note that I have no involvement with WebExtensions at this time, so I write this from the point of view of an observer. API? What API? I shall begin…

Interesting Win32 APIs

Yesterday I decided to diff the export tables of some core Win32 DLLs to see what&rsquo;s changed between Windows 8.1 and the Windows 10 technical preview. There weren&rsquo;t many changes, but the ones that were there are quite exciting IMHO. While researching these new APIs, I also stumbled across some others that were added during the Windows 8 timeframe that we should be considering as well.…

WaitMessage Considered Harmful

I could apologize for the clickbaity title, but I won&rsquo;t. I have no shame. Today I want to talk about some code that we imported from Chromium some time ago. I replaced it in Mozilla&rsquo;s codebase a few months back in bug 1072752 : (message_pump_win.cc) download 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 // A WM_* message is available. // If a parent child…