Closed
Bug 667287
Opened 14 years ago
Closed 14 years ago
Javascript shorthand function-style regexp calls no longer work in bootstrap addon code, throw "TypeError: /.../ is not a function"
Categories
(Toolkit :: Add-ons Manager, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dimsal.public, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0 ID:20110615151330
Just noticed that my bootstrap addon is broken in some places after upgrading to Firefox 5, and error console inspection shows errors when using the
/regexp/(arg)
syntax, throwing TypeError: /regexp/ is not a function. This happens both with regexps literals and variables.
I guess this is due to the recent introduction of JS version coercion in XPIProvider.jsm for bootstrap addon code ("ECMAv5" now used for evalInSandbox for bootstrap addons, though I couldn't find the bug that led to this fix). I'm sure this regexp bug was not intended though.
Also note that my addon passed Mozilla's automatic compatibility escalation to Firefox 5 and this problem was not detected.
I will mark this as major because this Javascript regexp feature is now reportedly commonplace even though it's not in Ecmascript, and there's no indication in documentation that it should not be used in bootstrap addons.
Reproducible: Always
Comment 1•14 years ago
|
||
See Bug 582717 and it was documented( https://developer.mozilla.org/en/Firefox_5_for_developers#JavaScript )
Comment 2•14 years ago
|
||
Invalid per bug 582717. We should have included this in the add-on compatibility checks though, did we?
| Reporter | ||
Comment 3•14 years ago
|
||
Sorry, I missed this information in comment 1.
Unless AMO folks might need this to rectify the compatibility checks, it appears invalid indeed.
The feature in question is still in official MDC docs, so I also posted notice to bug 582717.
Comment 4•14 years ago
|
||
We didn't include a check for it. That sort of RE utilization is fairly rare, though. I don't expect us to re-run our compat checks for this. Marking as invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•