Categories
Mozilla

Firebug and Firefox

One of my tasks this summer is to investigate the inclusion of Firebug in some distribution of Firefox. I’ve been playing with Firebug, submitting some patches to Joe, and trying to get a good feel for the codebase there. I have to say that it is a bit rough (and could really use some documentation), but I’m getting there. If I have time available, I’ll document things a bit better too.

The whole point of this is to present three questions to the community that I’d like to get input on. Leaving a comment is the best way to answer these questions:

  1. What does the DOM Inspector do that Firebug doesn’t?
  2. What does Venkman do that Firebug doesn’t?
  3. How would Firebug being included in some distribution of Firefox affect web developers?

I’m looking for answers to these questions with the perspective of a web developer. That is to say that I’m not concerned (at least for now) that Firebug doesn’t inspect chrome, so features specific to that should try to be avoided.

Categories
Mozilla

Firebug with XPCNativeWrappers

I’ve got a build of Firebug with XPCNativeWrappers enabled (normally they are disabled). This build is also working in Firefox 3. The problem I have, however, is that I do not know how to use Firebug all that well. I’ve tested basic functionality, and it seems to work, but I really need some people to test the hell out of it.

I expect things to not work, especially the debugger. So, if you find something that doesn’t work, let me know and try to provide a url and steps to reproduce.

Install Firebug Test Build

UPDATE: So, I didn’t actually up the maxversion of the extension. Also, XPCNativeWrappers are a bad idea since it will only let you use DOM methods (kinda useless for a lot of sites). I’ll be working on this more today…

Categories
Mozilla

Download Manager Back-end Changes

Now that the download manager back-end changes have landed and have stabilized, I figured that it’d be a good idea to get the word out. Basically, all of the RDF code has been pulled out, and we’ve switched over to using mozStorage as our back-end. The data is now stored in downloads.sqlite in your profile directory, and we do import the data from the existing file, downloads.rdf.

Doing this brought about changes to several interfaces (see Bug 380250). We no longer have the following methods and attributes for nsIDownloadManager because they were RDF related:

  • void startBatchUpdate()
  • void endBatchUpdate()
  • readonly attribute nsIRDFDataSource datasource

To replace the datasource attribute, readonly attribute mozIStorageConnection DBConnection was added. This gives you access to the mozIStorageConnection that the download manager uses.

Several methods were modified from using a persistent descriptor to using a download id. The persistent descriptor was overly complex, so we decided to can it in favor of a simple unsigned 32-bit integer that is automatically assigned by the database.

  • nsIDownload getDownload(in unsigned long aID)
  • void cancelDownload(in unsigned long aID)
  • void removeDownload(in unsigned long aID)
  • void pauseDownload(in unsigned long aID)
  • void resumeDownload(in unsigned long aID)
  • void open(in nsIDOMWindow aParent, in unsigned long aID)

Lastly, activeDownloads no longer returns an nsISupportsArray. Now it returns an nsISimpleEnumerator.

There were also a few changes to nsIDownload in this bug as well. The display name was changed from a wstring to an AString. We also added two new attributes to the interface:

  • readonly attribute unsigned long id
  • readonly attribute short state

One other interface was changed with this bug as well. nsIDownloadProgressListener had one more method added to it that is called whenever a download's state is changed:

  • void onDownloadStateChange(in short aState, in nsIDownload aDownload)

One other bug modified the API of the download manager, and in a way that people have been asking for for some time. Bug 289540 now allows someone to register more than one nsIDownloadProgressListener. Some extensions out there had to do some strange things to work around this, so I think they will be extremely happy to see this fixed. This caused the listener attribute to be removed, and two methods to be added:

  • void addListener(in nsIDownloadProgressListener aListener)
  • void removeListener(in nsIDownloadProgressListener aListener)

All of the idl files got comments revamped to better explain what is going on with methods and attributes. If something still seems unclear, talk to me and I'll get it fixed ASAP.

These API changes should be much more useful. If you have any questions or concerns about any of these changes (or think we are still lacking something with the API), please get in touch with me!

Categories
Mozilla Personal

RAM Upgrade

One day last week I was trying to run Windows Vista in a Parallels VM, watching my computer grind to a halt. It was paging, and boy was it painful. I decided it was a good idea to upgrade my Macbook’s RAM from 1GB to 2GB. I figured that this would cost me around $200-300, which I wasn’t to happy about. After actually looking for RAM, I found out that it would only cost me $90 which included the price of shipping and tax. I was ecstatic, and quickly purchased it.

Well, I finally installed it today, and I must say that my computer feels faster. Maybe it’s also because I had to reboot it (first time in at least a week), but things just feel faster. Now I can run Firefox in gdb and do other things without my computer freaking out and dying on me. It’s quite nice!

With that said, if anyone wants to buy a 512MB stick of Macbook RAM off of me, let me know as I now have two of them.

Categories
Growl

Growl Extension v1.0.1 Released!

That’s right, I finally got around to releasing the latest version of the Growl Extension for Firefox 2.0 and Thunderbird 2.0. This one has some nice fixes in it:

  • Cleaned up a memory leak when registering notifications
  • Enabled Notification support for Chatzilla
  • Enabled click-back support for Chatzilla notifications (focuses Chatzilla window)
  • Enabled click-back support for download notifications (opens/focuses the Download Manager)
  • Enabled click-back support for new mail notifications (opens/focuses Thunderbird)

My testing has shown this to be a rock solid release, and I’m quite proud of it. I have a few more things planned for it, so there still should be a few more releases, but otherwise, there isn’t much more to be done.

You can grab the extension on addons.mozilla.org.