Commit Graph

23 Commits

Author SHA1 Message Date
Valentin Gosu
b661246913 Bug 1453633 - Make nsHostObjectURI hold its principal wrapped in a nsMainThreadPtrHandle r=baku
nsIPrincipal is not yet threadsafe (bug 1443925). This is a problem in the context of threadsafe nsIURI, where cloning an nsIURI would also AddRef the principal.
To get around this problem, we use nsMainThreadPtrHandle<nsIPrincipal>. This means cloning the URI would not AddRef the principal (it addrefs the nsMainThreadPtrHolder that holds the principal). When the last ref is dropped, the principal is released on the main thread.

We should get rid of this once principals become thread-safe

MozReview-Commit-ID: AbJEhTNXVv6
2018-04-12 22:37:41 +02:00
Valentin Gosu
4d89c11464 Bug 1447330 - nsHostObjectURI does not define ReadPrivate. r=mayhemer
MozReview-Commit-ID: L7ndMrLRBBw
2018-03-20 16:40:36 +01:00
Valentin Gosu
839ef22f76 Bug 1416791 - Eliminate mutability from nsHostObjectURI by removing nsIURIWithBlobImpl r=baku
* blobImpl references are now only kept in nsHostObjectProtocolHandler
* removes nsHostObjectProtocolHandler.idl
* Makes nsHostObjectURI no longer inherit from nsSupportsWeakReference

MozReview-Commit-ID: AC1klrfsMnn
2018-03-21 15:33:15 +01:00
Valentin Gosu
edee0c2015 Bug 1442242 - Make the constuctors of URI implementations private r=mayhemer
MozReview-Commit-ID: LonNnZyJjVO
2018-03-20 23:23:31 +01:00
Noemi Erli
ce20343c41 Backed out 3 changesets (bug 1442242) for fatal error LNK1120: 1 unresolved externals bustages on a CLOSED TREE
Backed out changeset 9f37df3c62e1 (bug 1442242)
Backed out changeset 65b8727bfe76 (bug 1442242)
Backed out changeset 88130a542fb3 (bug 1442242)
2018-03-20 16:45:34 +02:00
Valentin Gosu
b23412f25b Bug 1442242 - Make the constuctors of URI implementations private r=mayhemer
MozReview-Commit-ID: 4oo66aYg66s
2018-03-20 12:52:50 +01:00
Valentin Gosu
c746fb04ed Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia
2018-03-19 20:22:32 +01:00
Andreea Pavel
d73ab14f2d Backed out 2 changesets (bug 1442239) for xpcshell failures at widget/tests/unit/test_taskbar_jumplistitems.js on a CLOSED TREE
Backed out changeset 513cd669aca1 (bug 1442239)
Backed out changeset aef4c73f736f (bug 1442239)
2018-03-19 21:19:26 +02:00
Valentin Gosu
17b4bb266e Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia
2018-03-08 13:35:10 +01:00
Valentin Gosu
3c323155ba Bug 1441688 - Remove nsIIPCSerializableURI.Deserialize r=mayhemer
MozReview-Commit-ID: 8gwX3vSKWNX
2018-03-05 04:14:44 +01:00
Valentin Gosu
3a4f98a41d Bug 1434163 - Make all nsIURI attributes readonly r=mayhemer
MozReview-Commit-ID: KtjO8VWjPF5
2018-02-27 00:07:48 +01:00
Nathan Froyd
7415052595 Bug 1441584 - part 2 - declare some URI classes final; r=valentin 2018-02-27 20:13:57 -05:00
Nathan Froyd
8ba465bbd2 Bug 1441584 - part 1 - declare inner URI Mutator classes final; r=valentin
For documentation purposes and to assist the compiler.
2018-02-27 20:13:57 -05:00
Valentin Gosu
b87fb0c99e Bug 1431760 - Add NS_MutateURI.Apply that allows calling methods declared in other interfaces implemented by NS_MutateURI::mMutator r=mayhemer
* The method can be chained just as the other methods on NS_MutateURI.
* In case the mutator object does not implement the interface, mStatus will be set to an error code.
* This is useful when you are constructing a new URI and the type of the mutator is known. I expect a future patch will add a MaybeApply method, that does not set mStatus to an error code if the mutator does not implement the interface.
* This patch changes nsHostObjectProtocolHandler::NewURI to use the new method and avoid a static_cast<nsHostObjectURI*>(uri)


MozReview-Commit-ID: 9kvXJX54gUP
2018-01-22 15:52:37 +01:00
Valentin Gosu
5f2b419de0 Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder
MozReview-Commit-ID: 53BD91hB2yi
2017-12-05 02:35:21 +01:00
shindli
3340ae0835 Backed out 2 changesets (bug 1420954) for build failure in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsIURIMutator.h:340:3: r=backout on a CLOSED TREE
Backed out changeset 8ce0a0d49d9e (bug 1420954)
Backed out changeset 480c6e1721e9 (bug 1420954)
2017-12-03 01:10:14 +02:00
Valentin Gosu
339cd6b127 Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder
MozReview-Commit-ID: 53BD91hB2yi
2017-12-02 23:09:34 +01:00
Valentin Gosu
30ecd962e7 Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder
This also changes URIUtils.cpp:DeserializeURI() to use the mutator to instantiate new URIs, instead of using their default constructor.

MozReview-Commit-ID: JQOvIquuQAP
2017-11-20 17:11:30 +01:00
Andrea Marchesini
37766315d4 Bug 1321261 - create dom/file for File APIs, r=qdot 2016-12-01 15:12:42 +01:00
Sebastian Hengst
903cc3ec3c Backed out changeset d3ef6f3e9193 (bug 1321261) for build bustage (calling missing file BlobParent.h from dom/ipc/TabParent.cpp). r=backout on a CLOSED TREE 2016-12-01 12:27:28 +01:00
Andrea Marchesini
4982909415 Bug 1321261 - create dom/file for File APIs, r=qdot 2016-12-01 11:43:18 +01:00
Sebastian Hengst
abf5b533a9 Backed out changeset 806c3d121dd4 (bug 1321261) for timing out in test_fileapi.html, test_mozfiledataurl.html and test_nonascii_blob_url.html on Linux x64 asan and debug. r=backout 2016-12-01 11:05:56 +01:00
Andrea Marchesini
1837b28622 Bug 1321261 - create dom/file for File APIs, r=qdot 2016-12-01 09:21:54 +01:00