avatar

Ehsan Akhgari is a programmer living in Toronto working for Mozilla. He has over 10 years of experience on browsers and the web platform and Firefox. Learn more about him here.

Intercepting beacons through service workers

Beacons are a way to send asynchronous pings to a server for the purposes such as logging and analytics. The API itself doesn't give you a way to get notified when the ping has been successfully sent, which is intentional since the ping may be sent a while after the page has been closed or navigated away from. There are use cases where the web developer wants to send a ping to the server which is a candidate to use a beacon for, but they also need to know when/if the ping is delivered successfully, which makes beacons an unsuitable solution.

Running Microsoft Visual C++ 2013 under Wine on Linux

The Wine project lets you run Windows programs on other operating systems, such as Linux. I spent some time recently trying to see what it would take to run Visual C++ 2013 Update 4 under Linux using Wine. The first thing that I tried to do was to run the installer, but that unfortunately hits a bug and doesn't work. After spending some time looking into other solutions, I came up with a relatively decent solution which seems to work very well.

Pushing to Mozilla hg servers directly from git

I've been using git for a few years for doing Mozilla work, which has caused me to have to go through a painful workflow every single time that I push code to inbound. Now, glandium has written this awesome tool that finally enables me to use git push to push an actual set of git commits to the hg servers, directly, without running Mercurial. My existing workflow for pushing involves exporting textual diffs from git, and importing the file into Mercurial, and deal with the conflicts myself, etc.

Building Firefox on Windows with clang-cl

Over the past three weeks or so, Jeff Muizelaar and I started to investigate what it would take for us to be able to use clang-cl to build Firefox on Windows, and I'm really excited to report that as of earlier this week, all of the patches required have landed on both mozilla-central and LLVM and we can produce debug builds that run at least for basic browsing. clang-cl is the LLVM project's drop-in replacement for Microsoft's Visual C++ compiler.

C++ deleting destructors

Recently during a code review, Benoit pointed out a strange linker error, that neither of us expected. Here's what the situation roughly looked like: $ cat test.cpp #include <new> class Base { public: virtual ~Base() {} }; class Derived : public Base { public: ~Derived() {} private: void* operator new(size_t); void* operator new[](size_t); void operator delete(void*); void operator delete[](void*); }; int main() { Derived d; return 0; } $ clang++ test.

Per-window private browsing ready for testing now!

One of the most often requested features in the private browsing support for Firefox has been the ability to open a private window without needing to close the entire session. Over the past 19 months, we have been working on a plan to rewrite the private browsing code to make it possible to open a private window without needing to close down the entire non-private session, and today, I'm happy to announce that we now have the first experimental builds with this feature ready for testing.