Closed Bug 495078 Opened 15 years ago Closed 14 years ago

Crash [@ NS_GetInnermostURI] with manifest attribute in file as child frame of chrome document

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: martijn.martijn, Assigned: timeless)

References

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(4 files)

Attached file iframe document
When opening the upcoming file under a chrome url, Mozilla crashes.

http://crash-stats.mozilla.com/report/index/e1132097-01f7-4de7-8006-ca91c2090526?p=1
0  	xul.dll  	NS_GetInnermostURI  	 obj-firefox/dist/include/nsNetUtil.h:1428
1 	xul.dll 	nsOfflineCacheUpdateService::OfflineAppAllowedForURI 	uriloader/prefetch/nsOfflineCacheUpdate.cpp:2642
2 	xul.dll 	nsOfflineCacheUpdateService::OfflineAppAllowed 	uriloader/prefetch/nsOfflineCacheUpdate.cpp:2632
3 	xul.dll 	nsContentUtils::OfflineAppAllowed 	content/base/src/nsContentUtils.cpp:853
4 	xul.dll 	xul.dll@0x392f27 	
5 		@0x58003f
This is a test extension that makes of C:\testfiles\ a chrome directory.
Put the files that I attached previously in that directoy and then go to: chrome://test/content/parentframe.htm to see the crash
Attached patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #379907 - Flags: superreview?(cbiesinger)
Attachment #379907 - Flags: review?(cbiesinger)
Blocks: 459822
Flags: blocking1.9.1?
Why is aURI null there to start with?
Need a regression window and confirmation that this happens on branch.

Martijn, did you just find this or is it happening in the wild?
because the caller was passed the system principal and got its uri (null).

offline apis should not be available for code w/ the system principal, so it's correct for OfflineAppAllowed to chain the system principal's null uri to OfflineAppAllowedForURI and return false. As both are public apis and this isn't a critical path, there's no reason to have an additional check in OfflineAppAllowed.

beltzner: you don't need a regression window, i've marked the bug that introduced this code as a dependency it landed before we branched for 1.9.1 (see the bug 459822 comment 6).
(In reply to comment #6)
> offline apis should not be available for code w/ the system principal, so it's

Why not? I was hoping I could use the offline apis from the local file system or at least from chrome, but both seem impossible.
"offline apis" for you means the offline cache defined by a cache manifest you refer with the manifest attribute? I don't see a reason to cache this way stuff on local disk (files and chrome). It just copies the files to the cache. Intention for the offline cache is to allow code and content (not data!) be run/accessible when you are offline from internet connection. chrome and files are accessible in such a situation w/o an offline caching.
Not blocking -- we shouldn't crash here, but it's uncommon and can be documented until we have some defense in place.  Fine to take for 3.5.1 if it's ready.
Flags: blocking1.9.1? → blocking1.9.1-
Attachment #379907 - Flags: superreview?(cbiesinger)
Attachment #379907 - Flags: superreview+
Attachment #379907 - Flags: review?(cbiesinger)
Attachment #379907 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/97c9c02d9694
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Crash Signature: [@ NS_GetInnermostURI]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: