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)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jdm, Assigned: jdm)

References

Details

Attachments

(2 files, 1 obsolete file)

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.
Blocks: 551181
Blocks: 558617
Attached patch Patch (obsolete) (deleted) — Splinter Review
This should do the trick.
Assignee: nobody → josh
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.
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.
dan are we good here?
The chrome reg handles nsJARURI in addition to the standard URL.
jdm, can we just use this spec+charset serialization for known schemes? For now, just about:
Sounds suitably hacky, but I'd r+ that ;)
to make it a bit less hacky, lets assert if we see something that isn't handled.
Attached patch Patch (deleted) — Splinter Review
Now with a check for about: if non-serializable.
Attachment #446149 - Attachment is obsolete: true
Attachment #447906 - Flags: review?(dwitte)
Comment on attachment 447906 [details] [diff] [review] Patch Nice. r=dwitte
Attachment #447906 - Flags: review?(dwitte) → review+
Keywords: checkin-needed
Whiteboard: [land in e10s]
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!
Attachment #455063 - Flags: review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
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?
maybe NS_ABORT_IF_FALSE should just be an assertion?
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.

Attachment

General

Created:
Updated:
Size: