A Good Day

Today was a good day. Not only did I not have to use my A.K., I didn’t have a computer melting down, a network outage, or anything else. I popped-up early in the morning, and managed to swim for an hour (hope to do that tomorrow too).

After my swim I sat down and began to work backwards through our code base to resolve an extension-related API issue. The Brave browser supports the Web Extension chrome.contextMenus.create method. We didn’t, however, expose an info.parentMenuItemId property to the handler, which caused problems for extensions that utilize nested context menus.

Not being particularly familiar with this part of the code base, I began by checking out the code for our chrome.contextMenus.* bindings. That quickly revealed the implementation of the create method, but I didn’t find that to be a particularly ideal place to add a fix.

With extensions, we pass data around between the C++ and JavaScript sides of the browser. This makes it a little difficult to hunt if you’re somewhat unfamiliar with the territory, as I am. That being said, I was able to eventually find the ideal place to add my changes.

In the end, it took only a single line of code to resolve the issue. But that single line was days in the making. It was the primary issue I have been wanting to resolve for the past week, but every attempt to address it caused some other obstacle to appear.

I was living-out that Light Bulb scene from Malcolm in the Middle. Hal sets out to accomplish a simple task: fix the light bulb. But before he can do that, he’ll have to fix several other things. If you haven’t yet experienced this phenomenon―your day is coming 😉

I’m content though. It has been a rough week, but I am content with how it turned out. I now have a better development environment established. I spent a day using Ubuntu and am better for it. I’m thankful for each stumble along the way. It wasn’t fun, but it made me better. It always does.

Today was a good day.