Unexpected persist when the persisted attribute name contains another




15 years ago
9 years ago


(Reporter: phnixwxz1, Unassigned)


(Blocks: 1 bug)


Firefox Tracking Flags

(Not tracked)



(1 attachment)

888 bytes, application/vnd.mozilla.xul+xml


15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.4) Gecko/20030624
Build Identifier: Most recent

For the following element definition:

if I execute the following JavaScript:
  document.documentElement.setAttribute('abcde', 'abcde');
  document.documentElement.setAttribute('cdefg', 'cdefg');

attributes 'abcde' and 'cdefg' are all incorrectly persisted in localstore.rdf.

This is caused by the following code in
        if (persist.Find(attr) >= 0) {
            rv = Persist(aElement, kNameSpaceID_None, aAttribute);
            if (NS_FAILED(rv)) return rv;

More presice matching should be used.

Reproducible: Always

Steps to Reproduce:
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/

Comment 2

14 years ago
Posted file test persist bug

Comment 3

14 years ago
This bug still exists in FireFox 1.0.7.  See attached test case. 
For the first time, all attributes('abcdefg', 'abcde', 'cdefg', 'xyz') have
their assigned values (same as their name).  After alerting, their values are
changed to '1234567', '12345', '34567', '789', respectively.  
When the xul is reloaded, their values should be '1234567', 'abcde', 'cdefg',
'xyz', respectively, which the actual values are '1234567', '12345', '34567', 'xyz'.

The attributes 'abcde' and 'cdefg' are mistakenly persisted.


13 years ago
Assignee: hyatt → nobody
Ever confirmed: true
OS: Windows XP → All
QA Contact: shrir → xptoolkit.xul
Hardware: PC → All


13 years ago
Blocks: 251273


11 years ago
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets

Comment 4

9 years ago
I confirmed the bug still exists in Firefox 3.6.10 and Minefield 4.0b7pre.
You need to log in before you can comment on or make changes to this bug.