Closed
Bug 1471811
Opened 7 years ago
Closed 7 years ago
"ReferenceError: Services is not defined" in autocomplete.xml
Categories
(Toolkit :: Autocomplete, defect)
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: tessarakt, Assigned: mak)
References
()
Details
Attachments
(1 file, 1 obsolete file)
I tried to make the Quickerfiler addon work again.
After fixing some easy issues, I got this message in the error console:
ReferenceError: Services is not defined[Learn More] autocomplete.xml:1764:11
The file given is is chrome://global/content/bindings/autocomplete.xml . Line 1764 is in this part of the file:
<method name="_unescapeUrl">
<parameter name="url"/>
<body>
<![CDATA[
return Services.textToSubURI.unEscapeURIForUI("UTF-8", url);
]]>
</body>
</method>
Comment 1•7 years ago
|
||
Does this happen without the add-on? autocomplete.xml is Mozilla core code used for Firefox. Does Firefox show a problem? Otherwise, it will be hard to convince the Mozilla core people that a fix is needed here.
Updated•7 years ago
|
Component: Untriaged → General
Comment 2•7 years ago
|
||
As far as my tests go I have determined that this guide to make custom autocomplete search component does not work either for the same reason as mentioned above. So if someone could make the changes to this guide to make this work we're all good or perhaps it is in fact a bug.
https://developer.mozilla.org/en-US/docs/Mozilla/How_to_implement_custom_autocomplete_search_component
Comment 3•7 years ago
|
||
Yes, ChromeUtils.import("resource://gre/modules/Services.jsm"); is missing in one/more of the <constructor>s in autocomplete.xml.
That should be fixed, right, Marco?
Component: General → Autocomplete
Flags: needinfo?(mak77)
Product: Thunderbird → Toolkit
Version: 60 → 60 Branch
Assignee | ||
Comment 4•7 years ago
|
||
This regressed in bug 1436559, autocomplete.xml may need to either import Services, or grow a this._services field.
Gijs, what do you think?
Blocks: 1436559
Flags: needinfo?(mak77) → needinfo?(gijskruitbosch+bugs)
Comment 5•7 years ago
|
||
(In reply to Marco Bonardo [::mak] from comment #4)
> This regressed in bug 1436559, autocomplete.xml may need to either import
> Services, or grow a this._services field.
> Gijs, what do you think?
We should really just make Services/AppConstants/XPCOMUtils available on every privileged scope. Though the binding is likely to go away soon as well... Anyway, in the meantime, I guess we could take a patch that adds a field or adds an import or something.
Flags: needinfo?(gijskruitbosch+bugs)
Updated•7 years ago
|
Comment 6•7 years ago
|
||
This should do it. Services is used in two bindings, so I added it to the corresponding constructors.
Please excuse the following comment (no offence intended): I've never understood why you leave fixing regressions to others, perhaps you can explain that.
Attachment #9025872 -
Flags: review?(mak77)
Assignee | ||
Comment 7•7 years ago
|
||
Regarding your question, I think it's no surprise that the Firefox codebase is undergoing a large rewrite, that affects other products based on the same codebase, and that our resources are limited (barely sufficient for Firefox, in my opinion). From a Firefox point of view this is not a regression, we import Services pretty much everywhere. Having a fix in a week would be a P1, that this is not, so if you want a quick fix, I don't see alternatives to contributing a patch. As usual we try to assist as best as possible with available time.
I'm looking at the patch, but I'm not convinced of the approach, so I'm asking for a second opinion around, stay tuned.
Assignee | ||
Comment 8•7 years ago
|
||
I'm sorry for late, picking this.
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•7 years ago
|
||
Updated•7 years ago
|
Attachment #9025872 -
Flags: review?(mak77)
Updated•7 years ago
|
Attachment #9025872 -
Attachment is obsolete: true
Comment 10•7 years ago
|
||
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/326ed3b7c894
"ReferenceError: Services is not defined" in autocomplete.xml. r=Gijs,jorgk
Comment 11•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•