Closed
Bug 340494
Opened 19 years ago
Closed 10 years ago
access document.domain at about:plugins produces NS_ERROR_FAILURE. No error at about:config
Categories
(Core :: Security, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: bugzilla, Assigned: akshendra521994, Mentored)
References
Details
(Whiteboard: [lang=c++])
Attachments
(1 file, 2 obsolete files)
3.12 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
I'm checking the domain on every page load in my extension and I noticed that when aobut:plugins load I get:
Error: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.domain]
Source file: chrome://tdccms/content/main.js
Line: 518
it does NOT happen when I load about:config or about:cache. It only seems to happen when I load about:plugins
why? is there something special with about:plugins or is this a bug?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060605 Minefield/3.0a1 ID:2006060505 [cairo]
Comment 1•19 years ago
|
||
I don't have a good answer... unlike the others, though, about:plugins is created using document.write(), wonder if that has anything to do with it.
Comment 2•16 years ago
|
||
Is this still a problem?
Comment 4•11 years ago
|
||
Bug 417021 that is. Sorry, did not mean to change status.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•11 years ago
|
||
about:plugins is not XHTML, so no.
What it is is system-principal, so there is no principal URI to be had.
I guess we could just return "" in this case instead of throwing if someone cares about this case... That would sort of match the spec.
Mentor: bzbarsky
Whiteboard: [lang=c++]
Assignee | ||
Comment 6•10 years ago
|
||
I will like to work on this.
Boris, can you hint me where to find to relevant code.
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 7•10 years ago
|
||
And also is this on all platforms or just WIN?
Comment 8•10 years ago
|
||
This is all platforms, and the relevant code is in nsHTMLDocument::GetDomain over in dom/html/nsHTMLDocument.cpp
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8519536 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•10 years ago
|
Attachment #8519536 -
Flags: review?(bzbarsky)
Comment 10•10 years ago
|
||
Akshendra Pratap Singh, why did you remove the review request? Was there an issue with the patch?
Flags: needinfo?(akshendra521994)
Assignee | ||
Comment 11•10 years ago
|
||
I thought that there could be a better solution then the one I tried in this patch. But since then I didn't got much time to look at that because of my academics. I will submit a new one within this week.
Am sorry if that caused any trouble. :)
Flags: needinfo?(akshendra521994)
Comment 12•10 years ago
|
||
No, no trouble, just making sure you're not waiting on me or something. ;)
Assignee | ||
Updated•10 years ago
|
Attachment #8519536 -
Flags: review?(bzbarsky)
Comment 13•10 years ago
|
||
Comment on attachment 8519536 [details] [diff] [review]
340494_documentDomain.patch
r=me
Attachment #8519536 -
Flags: review?(bzbarsky) → review+
Comment 14•10 years ago
|
||
Do you have the ability to push this to try?
Flags: needinfo?(akshendra521994)
Assignee | ||
Comment 15•10 years ago
|
||
Not yet, but I have applied for that.
Flags: needinfo?(akshendra521994)
Comment 16•10 years ago
|
||
Assignee: dveditz → akshendra521994
Comment 17•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment 18•10 years ago
|
||
Did this fix bug 417021 as well? Or can the getter still throw?
Comment 19•10 years ago
|
||
Yes, it did. We should remove the Throws annontation from the IDL.
Flags: needinfo?(akshendra521994)
Assignee | ||
Comment 20•10 years ago
|
||
Does that mean I have to remove the use of ErrorResult& rv?
Flags: needinfo?(akshendra521994)
Comment 21•10 years ago
|
||
Yep.
Assignee | ||
Comment 22•10 years ago
|
||
Attachment #8519536 -
Attachment is obsolete: true
Attachment #8530627 -
Flags: review?(bzbarsky)
Comment 23•10 years ago
|
||
Comment on attachment 8530627 [details] [diff] [review]
340494_documentDomain.patch
No, this is removing GetDomain from nsIDOMHTMLDocument, which is not desirable.
Instead, you can just have the getter be NS_IMETHODIMP and make sure it always returns NS_OK.
Attachment #8530627 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 24•10 years ago
|
||
Attachment #8530627 -
Attachment is obsolete: true
Attachment #8530647 -
Flags: review?(bzbarsky)
Comment 25•10 years ago
|
||
Comment on attachment 8530647 [details] [diff] [review]
340494_documentDomain.patch
r=me
Attachment #8530647 -
Flags: review?(bzbarsky) → review+
Comment 27•10 years ago
|
||
Asking for someone to commit it through this keyword.
Flags: needinfo?(bzbarsky)
Keywords: checkin-needed
Updated•10 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 28•10 years ago
|
||
I'm really confused. A patch already landed in this bug and now we're landing another patch that appears to not be built on top of it? Oh, and the previously landed patch is on Aurora now too.
Can we please sort this mess out before landing more under this bug number?
Keywords: checkin-needed
Comment 29•10 years ago
|
||
Ryan, the follow up patch is cleanup. I guess it doesn't matter whether that misses a train.
Comment 30•10 years ago
|
||
Yeah, the second patch should really have gone into a separate bug, imo.... Akshendra Pratap Singh, would you re-resolving this bug and creating a new one for landing the cleanup?
Updated•10 years ago
|
Flags: needinfo?(akshendra521994)
Comment 31•10 years ago
|
||
Actually just re-resolving. Please put the followup into a separate bug.
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•