Closed
Bug 1227554
Opened 10 years ago
Closed 10 years ago
DOM Inspector is non functional due to RDF Errors
Categories
(Other Applications :: DOM Inspector, defect)
Other Applications
DOM Inspector
Tracking
(firefox45+ fixed)
RESOLVED
FIXED
mozilla45
People
(Reporter: philip.chee, Assigned: ckerschb)
References
Details
(Keywords: addon-compat, regression)
Attachments
(1 file, 1 obsolete file)
2.31 KB,
patch
|
ckerschb
:
review+
|
Details | Diff | Splinter Review |
Error: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIRDFContainerUtils.IndexToOrdinalResource]
Source file: chrome://inspector/content/jsutil/rdf/RDFU.js
Line: 28
Error: undefined entity
Source file: chrome://inspector/content/res/viewer-registry.rdf
Line: 43, Column: 13
Source code:
<rdf:li><rdf:Description
![]() |
Reporter | |
Comment 1•10 years ago
|
||
Alice0775 Can you find the regression range? Thanks.
Flags: needinfo?(alice0775)
![]() |
||
Comment 2•10 years ago
|
||
(In reply to Philip Chee from comment #1)
> Alice0775 Can you find the regression range? Thanks.
I cannot reproduce the error.
Flags: needinfo?(alice0775)
![]() |
||
Comment 3•10 years ago
|
||
OK, I can repro without e10s. but not with e10s.
STR
1. Disabled e10s
2. Install DOM Inspector 2.0.16 and restart
3. Open DOM Inspector from menu
![]() |
||
Comment 4•10 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=c0eab88b18c27ac2fa767725f3b6268c0aeb320e&tochange=9c2bad72beab
Regressed by: Bug 1182546
Keywords: regression
![]() |
||
Updated•10 years ago
|
Flags: needinfo?(mozilla)
Keywords: addon-compat
![]() |
||
Comment 5•10 years ago
|
||
[Tracking Requested - why for this release]: Broken extension that probably shouldn't have been broken by the changes...
Unless this extension is linking to this DTD from untrusted content of some sort, of course.
Blocks: 1182546
tracking-firefox45:
--- → ?
Assignee | ||
Comment 6•10 years ago
|
||
Philip, any chance you could post the console error you are seing?
Flags: needinfo?(mozilla) → needinfo?(philip.chee)
![]() |
Reporter | |
Comment 7•10 years ago
|
||
(In reply to Christoph Kerschbaumer [:ckerschb] from comment #6)
> Philip, any chance you could post the console error you are seeing?
The only errors are in Comment 0
(In reply to Philip Chee from comment #0)
> Error: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057
> (NS_ERROR_ILLEGAL_VALUE) [nsIRDFContainerUtils.IndexToOrdinalResource]
> Source file: chrome://inspector/content/jsutil/rdf/RDFU.js
> Line: 28
>
> Error: undefined entity
> Source file: chrome://inspector/content/res/viewer-registry.rdf
> Line: 43, Column: 13
> Source code:
> <rdf:li><rdf:Description
The source code is @ http://hg.mozilla.org/dom-inspector/
http://mxr.mozilla.org/comm-central/source/mozilla/extensions/inspector/resources/content/res/viewer-registry.rdf?rev=d96d6863fe08&mark=43-43#42
http://mxr.mozilla.org/comm-central/source/mozilla/extensions/inspector/resources/content/jsutil/rdf/RDFU.js?rev=6c425834882f&mark=28-28#26
The DTD bz mentions is probably:
http://mxr.mozilla.org/comm-central/source/mozilla/extensions/inspector/resources/content/res/viewer-registry.rdf?rev=d96d6863fe08&mark=7-7#7
Flags: needinfo?(philip.chee)
![]() |
Reporter | |
Comment 8•10 years ago
|
||
Even with Bug 1228116 fix DOM Inspector still doesn't work
Flags: needinfo?(mozilla)
Assignee | ||
Comment 9•10 years ago
|
||
Boris, in the initial review you wrote:
> In the other cases, we should be using the principal of the document,
> or the null principal if there is no document (assuming that can happen at all).
Now we know that can actually happen, when running the DOM-Inspector we get:
> NS_ENSURE_TRUE(doc) failed: file /Users/ckerschb/Documents/moz/mc/parser/htmlparser/nsExpatDriver.cpp, line 800
We have two options:
(1) We could introduce yet another if-condition and either create NS_NewChannel(doc) or NS_NewChannel(nullprincipal), or
(2) we query the principal of the document (if there is one) and default to using the Nullprincipal otherwise.
I am not sure what the better option is. Within this patch I implement (2) since it reduces a little bit of complexity on the callsite. (1) on the other hand allows to store more accurate information within the loadInfo. Up to you, I don't feel strongly!
Btw, Firegestures within Bug 1226869 faces the same problem [1] and will be fixed with this patch as well.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1226869#c21
Flags: needinfo?(mozilla)
Attachment #8693987 -
Flags: review?(bzbarsky)
![]() |
||
Comment 10•10 years ago
|
||
Ah, so apparently our RDF parser drives expat directly, not via the XML content sink. So the nsIExpatSink in that case is an RDFContentSinkImpl and this always returns null from GetTarget().
txStylesheetSink is in the same situation, but presumably people don't normally load DTDs from those.
The other two implementations of nsIExpatSink are the XML and XUL content sinks, and both generally have a document to work with.
So what I think would be cleaner here in theory is to change nsIExpatSink to just have a getter returning a principal directly.
In practice, I can't tell when txStylesheetSink is used, and have low confidence in RDFContentSinkImpl being only used for system-ish stuff, so presumably using a nullprincipal for both would be OK if it allows loading the stuff we care about.
![]() |
||
Comment 11•10 years ago
|
||
Comment on attachment 8693987 [details] [diff] [review]
bug_1227554_expatdriver_default_nullprincipal.patch
r=me, but please:
loadingPrincipal = nsNullPrincipal::Create();
and if that returns null (which it can, just like do_CreateInstance can), please just bail out.
Attachment #8693987 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 12•10 years ago
|
||
Thanks Boris - let's take this patch as a fix so addons work again on Nightly!
Attachment #8693987 -
Attachment is obsolete: true
Attachment #8694856 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 13•10 years ago
|
||
Keywords: checkin-needed
Comment 14•10 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
![]() |
Reporter | |
Comment 15•10 years ago
|
||
Thank you Christoph!
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•