local file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

local file

jerryc-3
I'm getting a local file via XMLHttpRequest in a C++ component.  In alpha 3
this worked.  In alpha 7 I crash in nsCrossSiteListenerProxy::OnStartRequest
with a NULL mRequestingURI.  The file is "resource:/config.xml" or
"file:///C:/alpha7/mozilla/bld/dist/bin/config.xml"   IsSameOrigin
fails-XMLHttpRequest sniffs out the chrome page that loaded the component
and  bypasses the NULL-principal thing  ("Until we got our principal story
straight we have to do this to support C++ callers")  So is this just
something I'm going to have to wait out or will I have to change the way I
do things?




_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: local file

Boris Zbarsky
jerryc wrote:
> I'm getting a local file via XMLHttpRequest in a C++ component.  In alpha 3
> this worked.  In alpha 7 I crash in nsCrossSiteListenerProxy::OnStartRequest
> with a NULL mRequestingURI.

Er... that code is just wrong.  It should be crashing with a chrome
XMLHttpRequest as well, as far as I can tell, since the system principal has no
requesting URI.

Is there a bug filed on this?  We need to fix this.

> XMLHttpRequest sniffs out the chrome page that loaded the component
> and  bypasses the NULL-principal thing

You can prevent that by pushing null JSContext* on the XPConnect JS context
stack, for what it's worth.

-Boris

_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: local file

jerryc-3

> Is there a bug filed on this?  We need to fix this.

filed 392322.  I wanted to check first, it seemed I might have stumbled
across a work in progress.

> You can prevent that by pushing null JSContext* on the XPConnect JS
context
> stack, for what it's worth.

Thanks




_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml