Closed
Bug 566799
Opened 14 years ago
Closed 14 years ago
e10s: Make IPC::URI the go-to for all IPC URI action
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jdm, Assigned: jdm)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
dwitte
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
The story for passing URIs over the wire is well-known by now: either send the spec+charset pair, or use IPC::URI if you're really sure it's not going to break on you. We might as well add the slow path to IPC::URI as a fallback if serialization isn't possible.
Comment 2•14 years ago
|
||
This won't quite work -- calling NS_NewURI is not sufficient to duplicate a URI in general. Just create it. In the case of URIs with nsIPrincipals, or nested URIs (maybe?), the result won't be the same...
The various nsIURI::Clone() implementations would tell you a bit more about what's involved in duplication, but of course that's not serializable in itself.
So I think we still want to die in those cases. Implementing the new serialization interface seems like the way to go here. That way we look at each URI and can make sure we're doing the right thing.
Assignee | ||
Comment 3•14 years ago
|
||
One problem with the serialization route is with URL types implemented solely in JS, such as about:firstrun in Fennec. I don't quite understand what the problem with this solution is, seeing as it's the alternative mechanism that other code (such as the chrome registry) is already using.
Comment 4•14 years ago
|
||
dan are we good here?
Comment 5•14 years ago
|
||
What kind of URIs does the chrome registry deal with?
If you can figure out how these cases are going to work:
http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsFileDataProtocolHandler.cpp#144
http://mxr.mozilla.org/mozilla-central/source/caps/src/nsNullPrincipalURI.h#56
http://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsSimpleNestedURI.h#56
Then I'm good!
Assignee | ||
Comment 6•14 years ago
|
||
The chrome reg handles nsJARURI in addition to the standard URL.
Comment 7•14 years ago
|
||
jdm, can we just use this spec+charset serialization for known schemes? For now, just about:
Comment 8•14 years ago
|
||
Sounds suitably hacky, but I'd r+ that ;)
Comment 9•14 years ago
|
||
to make it a bit less hacky, lets assert if we see something that isn't handled.
Assignee | ||
Comment 10•14 years ago
|
||
Now with a check for about: if non-serializable.
Attachment #446149 -
Attachment is obsolete: true
Attachment #447906 -
Flags: review?(dwitte)
Comment 11•14 years ago
|
||
Comment on attachment 447906 [details] [diff] [review]
Patch
Nice. r=dwitte
Attachment #447906 -
Flags: review?(dwitte) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: [land in e10s]
Assignee | ||
Comment 12•14 years ago
|
||
This patch caused problems with the history landings, as schemes such as javascript: caused catastrophic failure. Good thing that there's an easy way to mitigate that!
Assignee | ||
Comment 13•14 years ago
|
||
Also, the first patch landed. http://hg.mozilla.org/projects/electrolysis/rev/84eb81208a4a
Updated•14 years ago
|
Attachment #455063 -
Flags: review+
Comment 14•14 years ago
|
||
Keywords: checkin-needed
Whiteboard: [land in e10s]
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 15•14 years ago
|
||
So... wait. How is having a whitelist like that sensible? Won't it just cause failures with schemes you didn't think about that we support, with extensions, etc, etc?
Comment 16•14 years ago
|
||
maybe NS_ABORT_IF_FALSE should just be an assertion?
Comment 17•14 years ago
|
||
Perhaps. What is this code trying to assert, in that case? You can't assert that nonserializable URIs don't exist; they clearly do....
You need to log in
before you can comment on or make changes to this bug.
Description
•