Closed Bug 380398 Opened 17 years ago Closed 17 years ago

appversion manifest flag is broken in certain situations

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mossop, Assigned: mossop)

Details

(Keywords: fixed1.8.0.13, fixed1.8.1.5)

Attachments

(2 files)

The appversion manifest flag is broken if you use a simple comparison (>, <, =) and the version number to compare against is only one digit.
Attached patch patch rev 1Splinter Review
Fixes the length check and adds an additional check that the version to compare was actually specified.
Attachment #264492 - Flags: review?(benjamin)
Attachment #264492 - Flags: review?(benjamin) → review+
Checking in nsChromeRegistry.cpp;
/cvsroot/mozilla/chrome/src/nsChromeRegistry.cpp,v  <--  nsChromeRegistry.cpp
new revision: 1.352; previous revision: 1.351
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Attached patch testcase rev 1Splinter Review
This testcase tests a number of scenarios for the appversion flag.

Much of the work involves creating and registering a directory service provider so that we can let the chrome registry know about our testcase manifest file, and then creating a dummy nsIXULAppInfo so we have control over it's version.

Once all that is done it is simply a case of trying to convert a chrome url for each testcase and checking that it succeeds and fails when appropriate.

I have confirmed that this passes at present, and fails with this bug backed out.
Attachment #266511 - Flags: review?(benjamin)
Comment on attachment 266511 [details] [diff] [review]
testcase rev 1

That's pretty cool, thanks!
Attachment #266511 - Flags: review?(benjamin) → review+
Checking in Makefile.in;
/cvsroot/mozilla/chrome/Makefile.in,v  <--  Makefile.in
new revision: 1.9; previous revision: 1.8
done
RCS file: /cvsroot/mozilla/chrome/test/Makefile.in,v
done
Checking in test/Makefile.in;
/cvsroot/mozilla/chrome/test/Makefile.in,v  <--  Makefile.in
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/chrome/test/unit/test_bug380398.js,v
done
Checking in test/unit/test_bug380398.js;
/cvsroot/mozilla/chrome/test/unit/test_bug380398.js,v  <--  test_bug380398.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/chrome/test/unit/data/test_bug380398.manifest,v
done
Checking in test/unit/data/test_bug380398.manifest;
/cvsroot/mozilla/chrome/test/unit/data/test_bug380398.manifest,v  <--  test_bug380398.manifest
initial revision: 1.1
done
Flags: in-testsuite? → in-testsuite+
Comment on attachment 264492 [details] [diff] [review]
patch rev 1

Requesting branch approval for a low risk patch that clears up a bug for add-on authors.
Attachment #264492 - Flags: approval1.8.1.5?
Attachment #264492 - Flags: approval1.8.0.13?
Comment on attachment 264492 [details] [diff] [review]
patch rev 1

approved for 1.8.1.5 and 1.8.0.13, a=dveditz for release-drivers
Attachment #264492 - Flags: approval1.8.1.5?
Attachment #264492 - Flags: approval1.8.1.5+
Attachment #264492 - Flags: approval1.8.0.13?
Attachment #264492 - Flags: approval1.8.0.13+
Checking in nsChromeRegistry.cpp;
/cvsroot/mozilla/chrome/src/nsChromeRegistry.cpp,v  <--  nsChromeRegistry.cpp
new revision: 1.338.2.4; previous revision: 1.338.2.3
done

Checking in chrome/src/nsChromeRegistry.cpp;
/cvsroot/mozilla/chrome/src/nsChromeRegistry.cpp,v  <--  nsChromeRegistry.cpp
new revision: 1.338.2.1.4.3; previous revision: 1.338.2.1.4.2
done
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in before you can comment on or make changes to this bug.