Closed Bug 399707 Opened 15 years ago Closed 14 years ago

Add inverse matching for string flags

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: mossop, Assigned: mossop)

Details

Attachments

(1 file)

For the string flags (application and the coming os flag) we can currently only apply a manifest directive on a match, not on a mismatch.

As an example I have an extension where I want to have one skin on mac and another on all other operating systems. It's not totally impossible to do it now but it would be far simpler to be able to have:

skin foo classic/1.0 skin/mac os=darwin
skin foo classic/1.0 skin/default os!=darwin

I can also imagine situations where people want to do one thing for one app and another everywhere else which this would fix as well.
Attached patch patch rev 1Splinter Review
Implements a != comparison for string flags.
Attachment #284788 - Flags: review?(benjamin)
Status: NEW → ASSIGNED
Attachment #284788 - Flags: review?(benjamin) → review+
Comment on attachment 284788 [details] [diff] [review]
patch rev 1

Looking for approval, this is a simple change with unit testing that adds a useful feature for app/extension authors.
Attachment #284788 - Flags: approval1.9?
Whiteboard: [has patch][has reviews]
Whiteboard: [has patch][has reviews] → [has patch][has reviews][needs approval]
Comment on attachment 284788 [details] [diff] [review]
patch rev 1

a=release drivers
Attachment #284788 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Whiteboard: [has patch][has reviews][needs approval] → [has patch][has reviews]
Checking in chrome/src/nsChromeRegistry.cpp;
/cvsroot/mozilla/chrome/src/nsChromeRegistry.cpp,v  <--  nsChromeRegistry.cpp
new revision: 1.356; previous revision: 1.355
done
RCS file: /cvsroot/mozilla/chrome/test/unit/test_bug399707.js,v
done
Checking in chrome/test/unit/test_bug399707.js;
/cvsroot/mozilla/chrome/test/unit/test_bug399707.js,v  <--  test_bug399707.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/chrome/test/unit/data/test_bug399707.manifest,v
done
Checking in chrome/test/unit/data/test_bug399707.manifest;
/cvsroot/mozilla/chrome/test/unit/data/test_bug399707.manifest,v  <--  test_bug399707.manifest
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M10
Flags: in-testsuite+
Whiteboard: [has patch][has reviews]
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.