Various weird warnings on startup

RESOLVED INVALID

Status

()

Firefox
Untriaged
RESOLVED INVALID
5 years ago
2 years ago

People

(Reporter: bz, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

BUILD: inbound from today, built from rev 5f53242d94bc

STEPS TO REPRODUCE:
1)  Set "browser.newtab.url" to "about:blank" in about:config.
2)  Quit browser.
3)  Start browser.
4)  Click in the URL bar.
5)  Click in the (blank) content area.

ACTUAL RESULTS:
After step 3: 
JavaScript strict warning: chrome://global/content/bindings/browser.xml, line 223: reference to undefined property this.boxObject.QueryInterface(...).docShell

After step 5: 
JavaScript strict warning: chrome://browser/content/urlbarBindings.xml, line 661: reference to undefined property this._value
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 643: aUrl is undefined

EXPECTED RESULTS: No warnings or especially errors.

For the error bit, it looks like we don't call onBeforeValueSet until I start typing in the url bar or something, so when I do that first click in the content area this._value is in fact undefined and we then try to treat it as a string and lose. Should that field perhaps be initialized to "" instead?
(In reply to Boris Zbarsky (:bz) from comment #0)
> JavaScript strict warning: chrome://global/content/bindings/browser.xml,
> line 223: reference to undefined property
> this.boxObject.QueryInterface(...).docShell

I have no idea what's going on here.

> For the error bit, it looks like we don't call onBeforeValueSet until I
> start typing in the url bar or something, so when I do that first click in
> the content area this._value is in fact undefined and we then try to treat
> it as a string and lose. Should that field perhaps be initialized to ""
> instead?

Yep.

Comment 2

5 years ago
About JavaScript error: chrome://browser/content/urlbarBindings.xml ..

I have browser.newtabpage.enabled:false - but it's not big difference.


This bug didn't bother me much (since few relases ago
it's enough to open a new tab, then no more pollution of error console)
but I found it may be problem for others: 

  http://code.google.com/p/musicpm/issues/detail?id=127



In urlbarBindings.xml few things are not consistent:

  <handler event="blur">
      this._clearNoActions();		  // without parameter !!!

  <handler event="keyup">
      this._clearNoActions();		  // without parameter !!!


  <method name="_clearNoActions">         // never called with aURL parameter set
    <parameter name="aURL"/>		  // aURL parameter never used
      this._parseActionUrl(this._value);  // using some value that's not always set


this._value is only set in:

  <method name="onBeforeValueSet">
    <parameter name="aValue"/>
      this._value = aValue;
      var returnValue = aValue;
      var action = this._parseActionUrl(aValue);



I can't easy follow intentions or logic off bigger stuff,
but I can confirm that:


* content\browser\urlbarBindings.xml

    <implementation implements="nsIObserver, nsIDOMEventListener">
      <constructor><![CDATA[
+        this._value="";
        this._prefs = Components.classes["@mozilla.org/preferences-service;1"]
                                .getService(Components.interfaces.nsIPrefService)
                                .getBranch("browser.urlbar.");

makes everything looking fine.
Hi,

I didn't managed to reproduce this issue on the latest release(43.0.4) nor the latest Nightly(46.0a1).

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20160105164030

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160113030208

Due to the fact that the browser.newtab.url preference was removed by fixing https://bugzilla.mozilla.org/show_bug.cgi?id=1118285 , I will mark this issue as Resolved-Invalid.

Thank you,
Vlad
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.