Closed
Bug 911498
Opened 12 years ago
Closed 12 years ago
page-mod/match-pattern.js requires itself
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(firefox24 unaffected, firefox25+ fixed, firefox26+ fixed)
RESOLVED
FIXED
mozilla26
Tracking | Status | |
---|---|---|
firefox24 | --- | unaffected |
firefox25 | + | fixed |
firefox26 | + | fixed |
People
(Reporter: magnus.henoch, Assigned: magnus.henoch)
References
Details
(Keywords: regression)
Attachments
(2 files)
483 bytes,
patch
|
Details | Diff | Splinter Review | |
715 bytes,
patch
|
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release)
Build ID: 20130830004004
Steps to reproduce:
Using the Flattr Firefox addon (https://github.com/flattr/fx-flattr-addon), open its web page.
Actual results:
In Firefox 23.0.1, the Flattr logo is displayed in the address bar. This is the expected behaviour.
In Aurora 25.0a2 (2013-08-30), there is no logo displayed in the address bar. Additionally, when running the addon with the Addon SDK, the following error is displayed:
console.error: flattr:
Message: TypeError: require(...).MatchPattern is not a constructor
Stack:
@resource://firefoxaddon-at-flattr-dot-com/flattr/lib/main.js:14
The line in question is this:
flattrPattern = new (require("sdk/page-mod/match-pattern").MatchPattern)("*.flattr.com"),
This suggests that sdk/page-mod/match-pattern.js doesn't export MatchPattern. This file is a small stub that emits a deprecation warning pointing users to sdk/util/match-pattern, and then requires itself. Presumably it meant to require the replacement module, as in the attached patch. With this patch, the addon can be loaded and works as expected.
Comment 1•12 years ago
|
||
Magnus, thanks for this! I can merge this in, or if you'd like you can send a PR on our Github repo for the change and I'll get this merged in.
Flags: needinfo?(magnus.henoch)
Updated•12 years ago
|
Assignee: nobody → jsantell
Assignee | ||
Comment 2•12 years ago
|
||
Here it is: https://github.com/mozilla/addon-sdk/pull/1231
Flags: needinfo?(magnus.henoch)
Comment 3•12 years ago
|
||
Great, thank you!
Comment 4•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/3ecc2b5c8a6b928b9aa4ee16414663148860c625
Merge pull request #1231 from legoscia/patch-1
Fix Bug 911498 Fix circular require in page-mod/match-pattern.js, r=@jsantell
Updated•12 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•12 years ago
|
||
Thanks! Will this fix be included in Firefox 25?
status-firefox25:
--- → ?
Out of curiosity, is 24 affected?
status-firefox25:
? → ---
tracking-firefox25:
--- → ?
Assignee | ||
Comment 7•12 years ago
|
||
No, Firefox 24 is not affected. It still has the pre-deprecation page-mod/match-pattern.js.
Comment 8•12 years ago
|
||
Where will the uplift request be? I don't see an r+ patch on this bug.
status-firefox24:
--- → unaffected
status-firefox25:
--- → fixed
status-firefox26:
--- → fixed
tracking-firefox26:
--- → +
Keywords: regression
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 850367
User impact if declined: The SDK match-pattern module doesn't actually get exported if users require it from the deprecated location, which could break things for some addons.
Testing completed (on m-c, etc.): This landed on m-c almost two weeks ago, no problems have been raised about it.
Risk to taking this patch (and alternatives if risky): None
String or IDL/UUID changes made by this patch: None
jsantell r+'d the original pull request.
Attachment #805524 -
Flags: approval-mozilla-aurora?
(In reply to Wes Kocher (:KWierso) from comment #9)
Asked for aurora approval, but I guess 25 will be on beta by the time this is dealt with.
Updated•12 years ago
|
Comment 11•12 years ago
|
||
Comment on attachment 805524 [details] [diff] [review]
Patch for Firefox25
[Triage Comment]
Approving for FF25 Beta uplift now that we're past merge.
Attachment #805524 -
Flags: approval-mozilla-aurora? → approval-mozilla-beta+
Comment 13•12 years ago
|
||
Assignee: jsantell → magnus.henoch
Updated•12 years ago
|
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•