Closed
Bug 329230
Opened 18 years ago
Closed 1 month ago
Prefix "cache" in RDFServiceImpl::GetResource() can lead to mishandling of resource URIs
Categories
(Core Graveyard :: RDF, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: matthew.gertner, Unassigned)
References
()
Details
Attachments
(1 obsolete file)
RDFServiceImpl::GetResource() uses the prefix (i.e. scheme) of the resource URI to identify a factory to instantiate the resource implementation. If no factory is found for that prefix, the default one is used. For optimization purposes, the method remembers the last prefix and factory used. This goes wrong if a resource is instantiated with the URI "foo" (no prefix so the default factory is used) and then a foo:bar resource is instantiated, where the foo: prefix has its own factory. Because the URI "foo" is remembered erroneously as the last prefix, the default factory is used instead of the foo factory.
Comment 1•18 years ago
|
||
Sadly, we can't just error in onvalid URIs. Localstore and in particular, XUL persistance, has it all over. Pfft.
Reporter | ||
Comment 2•18 years ago
|
||
Yeah, I guess the right thing to do is not remember the "last prefix" if the URI is invalid. I'll take the bug and propose a patch when I get a chance.
Status: NEW → ASSIGNED
Reporter | ||
Updated•18 years ago
|
Assignee: nobody → matthew
Status: ASSIGNED → NEW
Reporter | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•18 years ago
|
||
This is a patch that can actually be applied to a normal Mozilla tree without the need for hand-tweaking (as was the case with the previous version). I also made a number of the changes Daniel asked for, mostly (but not exclusively) to do with formatting. I haven't changed the behavior (e.g. of minimizeAll) or added features (e.g. number of clicks to restore) since I still hold out the hope that someone who actually wants these will pick up the ball and implement them. A much bigger problem with the current patch is that it still crashes when you right-click a few times on the tray icon. I spent a considerable amount of time investigating this, but I don't know anything about the handling of events and frames inside Mozilla, and the code is too complex to fix this or find a workaround without a significant time investment. If someone knowledgeable in this area can help out (at least by giving me a nudge in the right direction) this would be greatly appreciated. Otherwise this patch is basically useless.
Reporter | ||
Comment 4•18 years ago
|
||
Comment on attachment 226161 [details] [diff] [review] Patch that can be applied painlessly [Wrong bug] Sorry wrong bug :-O
Attachment #226161 -
Attachment is obsolete: true
Reporter | ||
Comment 5•17 years ago
|
||
Taking this off my todo list since we're no longer using Mozilla's RDF implementation.
Assignee: matthew → nobody
Status: ASSIGNED → NEW
Updated•12 years ago
|
Attachment #226161 -
Attachment description: Patch that can be applied painlessly → Patch that can be applied painlessly
[Wrong bug]
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•