Closed Bug 1416343 Opened 2 years ago Closed 2 years ago

Mark nsIURI and interfaces extending it as [builtinclass]

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox58 --- wontfix
firefox59 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

No description provided.
Assignee: nobody → valentin.gosu
Priority: -- → P3
Whiteboard: [necko-triaged]
Comment on attachment 8927933 [details]
Bug 1416343 - Mark URI interfaces as [builtinclass]

https://reviewboard.mozilla.org/r/199174/#review204618

LGTM, just one little minor things...

::: browser/modules/test/browser/browser_SitePermissions_tab_urls.js:10
(Diff revision 1)
>  "use strict";
>  
>  Cu.import("resource:///modules/SitePermissions.jsm", this);
>  
> +function uri(url) {
> +  return Services.io.newURI(url);

nit: this seems to use a smaller indent than other parts of this file?
Attachment #8927933 - Flags: review?(daniel) → review+
Comment on attachment 8927933 [details]
Bug 1416343 - Mark URI interfaces as [builtinclass]

https://reviewboard.mozilla.org/r/199174/#review204618

> nit: this seems to use a smaller indent than other parts of this file?

This file has several indentation types. I'm going to stick with 2 spaces for now.
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/cfe4b1e6be9b
Mark URI interfaces as [builtinclass] r=bagder
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5fcc3fb66b12
Mark URI interfaces as [builtinclass] r=bagder
https://hg.mozilla.org/mozilla-central/rev/5fcc3fb66b12
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
What was the motivation for this change? It's breaking Thunderbird quite badly since we rely on being able to define a URL class with is derived from nsIURI in JS.

In fact, Thunderbird offers a facility to define mail account types in JS (called JS Account). Since TB relies on URLs to address almost everything, mail messages, servers, etc. using various nsIURI-derived classes, this JS Account module is now broken.
(In reply to Jorg K [Almost not working on Thunderbird (some bustage-fix only) due to non-renewal of contract] from comment #11)
> What was the motivation for this change? It's breaking Thunderbird quite
> badly since we rely on being able to define a URL class with is derived from
> nsIURI in JS.

This is a necessary step in our plan to make nsIURI thread safe (bug 922464). Being implemented in JS makes it impossible to be used OMT.

For now, you can probably revert this change in Thunderbird code. As we change a lot of the code to use the new URI API, keeping up with the changes could be a bit more difficult. But if you are sure the JS implemented URIs are only used on the main thread, you can create a new C++ wrapper that forwards calls to the JS implementation.
Flags: needinfo?(valentin.gosu)
You need to log in before you can comment on or make changes to this bug.