If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

named MozNamedAttrMap accesses fail intermittently

RESOLVED WORKSFORME

Status

()

Core
DOM
RESOLVED WORKSFORME
4 years ago
4 years ago

People

(Reporter: John Firebaugh, Unassigned)

Tracking

({regression})

23 Branch
x86
Mac OS X
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox22 unaffected, firefox23 ?)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20130507 Firefox/23.0
Build ID: 20130507030948

Steps to reproduce:

Loaded http://openstreetmap.us/iD/release/#layer=Bing&map=19.23/-77.03292/38.91324


Actual results:

Observed that no map data was shown; opened the developer console and saw the error "TypeError: attrs.id is undefined" and/or "TypeError: attrs.k is undefined" (the exact error seems to be timing sensitive).


Expected results:

No error; map data loads and is displayed.

What seems to be happening is that named property accesses of a MozNamedAttrMap (implementing the NamedNodeMap interface) fail intermittently in Firefox Nightly 2013-05-07. For example, accessing `attrs.id` sometimes produces the error: "TypeError: attrs.id is undefined" when an id attribute is in fact present.

Note that if Firebug is enabled, or the "Debugger" tab of the native developer tools is enabled, the bug is no longer reproducible.
(Reporter)

Comment 1

4 years ago
It appears that attrs.getNamedItem is not affected by this bug. attrs.getNamedItem('id') always returns the correct value, even when attrs.id returns undefined.

Comment 2

4 years ago
It's a recent regression, the map background is still present but not the overlay marking out the houses/streets/etc.

m-c
good=2013-04-30
bad=2013-05-01
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dd0c611a0a27&tochange=02aa81c59df6

Error console:
Error: TypeError: attrs.k is undefined
Source File: http://openstreetmap.us/iD/release/iD.js
Line: 18595

iD.js code:
function getTags(obj) {
        var elems = obj.getElementsByTagName(tagStr),
            tags = {};
        for (var i = 0, l = elems.length; i < l; i++) {
            var attrs = elems[i].attributes;
            tags[attrs.k.nodeValue] = attrs.v.nodeValue;
        }
        return tags;
    }
Status: UNCONFIRMED → NEW
status-firefox22: --- → unaffected
status-firefox23: --- → ?
Component: Untriaged → DOM
Ever confirmed: true
Keywords: regression, regressionwindow-wanted
Product: Firefox → Core
Turning off ion.content fixes this.  I am betting this is bug 869040.

I am guessing this started appearing when it did due to the fix for bug 717637: we now actually manage to run this code in the ion ic.  Also contributing are bug 852092 (which introduced the bug in the ic) and bug 852135 (which made us use a new-binding proxy here).
Blocks: 717637, 852135, 852092
Depends on: 869040

Comment 4

4 years ago
Yes, bug 717637 is present in the reg changelog, so it's likely the culprit.
Keywords: regressionwindow-wanted
John, this should be fixed now. Could you confirm?
Flags: needinfo?(john.firebaugh)
(Reporter)

Comment 6

4 years ago
Confirm, working as expected in 2013-05-09 nightly.
Flags: needinfo?(john.firebaugh)
Thanks
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.