Skip to content
This repository has been archived by the owner on Oct 18, 2018. It is now read-only.

Support GC API in nightly builds #90

Closed
whimboo opened this issue Mar 14, 2012 · 14 comments
Closed

Support GC API in nightly builds #90

whimboo opened this issue Mar 14, 2012 · 14 comments
Milestone

Comments

@whimboo
Copy link
Contributor

whimboo commented Mar 14, 2012

The Garbage Collector API has been landed and we should support it:
https://bugzilla.mozilla.org/show_bug.cgi?id=531396

@whimboo
Copy link
Contributor Author

whimboo commented Mar 14, 2012

See https://bug531396.bugzilla.mozilla.org/attachment.cgi?id=605977 for an example implementation.

@dglol
Copy link
Contributor

dglol commented Mar 15, 2012

This should be top priority since this evening's (3.14) nightly build is not supported by memchaser.

@whimboo
Copy link
Contributor Author

whimboo commented Mar 15, 2012

What do you mean with not supported by memchaser? We have not stopped sending data via the console service. So the GC messages are clearly broken now:

GC(T+0.0) T

Please file a bug for Firefox in Core:Javascript Engine, so it can be fixed.

@dglol
Copy link
Contributor

dglol commented Mar 15, 2012

Bug has been filed: https://bugzilla.mozilla.org/show_bug.cgi?id=735994

@terrence2
Copy link
Contributor

Bug should be fixed now. Sorry for the bustage.

@dglol
Copy link
Contributor

dglol commented Mar 16, 2012

Thanks for fixing the bug @terrence2!
There's just one more problem and that's our regex is broken in FF14 due to the fact that TotalTime is now Total Time. Do you know if this was intentional?

@whimboo
Copy link
Contributor Author

whimboo commented Mar 16, 2012

I hope that this is only a failure. Changing keys in each version is kinda for us to keep up with support across branches. I will comment on the bug.

@whimboo
Copy link
Contributor Author

whimboo commented Mar 16, 2012

Hm, looks like this was intentional. :S So we should once again update our extension and release a minor version.

@whimboo
Copy link
Contributor Author

whimboo commented Mar 16, 2012

We will release version 0.2.1 of memchaser today which keeps track of the changes in the console message. See #94 and #92. It doesn't contain any code to use the observer notifications.

@terrence2
Copy link
Contributor

Added another patch for memchaser to the bugzilla bug. This one supports both old and new browsers and should apply cleanly against master. I'll see about formatting it as a pull request after lunch.

@dglol
Copy link
Contributor

dglol commented Mar 16, 2012

Services.jsm (resource://gre/modules/Services.jsm) supports the observer service so I believe you can reuse some of the code. Other than that, it looks good!

NIT: I probably would have checked for the app version (config.APP_BRANCH) instead of using the property "service" to indicate when the observer service is needed.

@terrence2
Copy link
Contributor

Ah, yes, checking the config version directly should be fine here.

Could you elaborate on what you mean with your first comment? I see that memchaser is doing a Components.utils.import on the jsm you mentioned, but I'm not sure how (or if) it interacts with Components.classes[].getService. Trying to just do Services.addObserver(...) results in an error, so I'm guessing it's more complicated than that. Sorry for being clueless, this is the first time I've looked at a Firefox add-on. :-)

@dglol
Copy link
Contributor

dglol commented Mar 16, 2012

The ObserverService is expose in the initTable of Services.jsm so the usage would be Services.obs.addObserver(...) instead.

Also, another thing to note is that the Components.* objects can be replaced with their initials (as long as it has been intialized). For example, you can use Cc for Components.classes, Ci for Compontents.interfaces, etc.

@whimboo
Copy link
Contributor Author

whimboo commented Mar 22, 2012

Now merged via pull #99

@whimboo whimboo closed this as completed Mar 22, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants