Add yet more GCLI tests, this time for developer toolbar

RESOLVED FIXED in Firefox 15

Status

()

Firefox
Developer Tools: Console
P3
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jwalker, Assigned: jwalker)

Tracking

Trunk
Firefox 15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
Created attachment 620054 [details] [diff] [review]
Upload 1

I took this out of the mega-patch earlier to make it less mega.
Please could you take a particularly close look at oneTimeObserve().
Thanks.
Attachment #620054 - Flags: review?(rcampbell)
Comment on attachment 620054 [details] [diff] [review]
Upload 1

+
+  // Christmas tree!

! :)

+function oneTimeObserve(name, callback) {
+  var func = function() {
+    Services.obs.removeObserver(func, name, false);

Don't need the third argument on removeObserver (it takes 2).

+    console.log('OTO end ' + name);

probably unneeded now?

+    callback();

I might use callback.call() just to be a pedant, but it's your call. (see what I did there?)
Attachment #620054 - Flags: review?(rcampbell) → review+
(In reply to Rob Campbell [:rc] (:robcee) from comment #2)
> Comment on attachment 620054 [details] [diff] [review]

> +function oneTimeObserve(name, callback) {
> +  var func = function() {
> +    Services.obs.removeObserver(func, name, false);
> 
> Don't need the third argument on removeObserver (it takes 2).

Ok, thanks. I smell some confusion with addEventListener.

> +    console.log('OTO end ' + name);
> 
> probably unneeded now?

Yes.

> +    callback();
> 
> I might use callback.call() just to be a pedant, but it's your call. (see
> what I did there?)

Is there any technical difference between the 2? - I'm happy to change it, but adding chars seems like it needs a justification!

Thanks,

Joe.
Created attachment 623231 [details] [diff] [review]
Upload 2

Fixes Rob's comments
Attachment #620054 - Attachment is obsolete: true
Relevant tries:
https://tbpl.mozilla.org/?tree=Try&rev=77b47c8bbc35
https://tbpl.mozilla.org/?tree=Try&rev=1ce36097dc58

Updated

5 years ago
Attachment #623231 - Flags: review+
Try before land:
https://tbpl.mozilla.org/?tree=Try&rev=eba127ab7962

Fx-Team:
https://tbpl.mozilla.org/?tree=Fx-Team&rev=0f08ab4dfcac
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/0f08ab4dfcac
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.