Thanks John,

I've solved this problem by explicitly call:
    this._request instanceof Components.interfaces.nsIJSXMLHttpRequest;
before assign the event handler.
now I can download the mar file, but it seems the installation doesn't
happend automatically, the update.status is changed to pending, but the mar
file didn't get installed ever.
I could do manually running updater.exe to apply the mar file, but I think
it should happen automatically. How does firefox call updater? it is
commented in the js file :
"        // Tell the updater.exe we're ready to apply. "
after complete download.
and also I got access violation after this when saving the updates, it is
just trying to modify the active-update.xml and updates.xml file. I could
not figure out why.

Any help would be really appreciated.

Thanks,

Kate.

"John Bandhauer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Kate X wrote:
> > After a couple of days of debugging , I am able to start the update
service
> > when application startup, but during the checkForUpdates, when trying to
> > open xmlhttprequest for update.xml, I got this error:
> >
> > JavaScript Error: "[Exception... "Cannot modify properties of a
> > WrappedNative"  nsresult: "0x80570034
(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"
> > location: "JS frame ::
> > file:///c:/Development/Client/Bin/Debug/components/nsUpdateService.js ::
> > anonymous :: line 1745"  data: no]"
> > in lines :
> >     this._request.onerror     = function(event) {
f.onError(event);    };
> >     this._request.onload      = function(event) {
.onLoad(event);     };
> >     this._request.onprogress  = function(event) {
self.onProgress(event); };
> >
> > And I checked the doc of nsIXMLHttpRequest.idl, it says these are meant
to
> > be script-only mechanism, and should not be used from native code. But
this
> > error seems tell that I tried to use it from native code, I don't know
> > what's wrong.
> >
> > Could anyone help me out with this?
>
> The error suggests that XPConnect is not aware that the underlying
> object also implements nsIJSXMLHttpRequest. So, it looks like
> XPConnect thinks you are trying to add arbitrary properties rather
> than accessing the declared attributes. Doing an explicit
> QueryInterface call before trying to access these attributes would
> probably remedy this. See other code that does exactly that:
>
> http://lxr.mozilla.org/seamonkey/search?string=nsIJSXMLHttpRequest
>
> Although, it looks like the DOM implementation of the class is setting
> up classinfo stuff. So, I'm not really sure from a very quick look why
> this is not happening automatically. Neverthless, the lxr link above
> shows instances where others are doing explicit QueryInterface calls
> to do what you are trying to do.
>
> John.
>
> > Thanks,
> >
> > Kate.
> > "Kate X" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >> Hi there,
> >>
> >> Here we have developed our own plugins, I want to use the updateservice
to
> >> check the updates of our plugin,  how should I do? The implementation
is
> > in
> >> javascript nsUpdateService.js, but when I try to get it I got missing
> >> xulruntime error.
> >> Anyone could give me a lead on this?
> >> Thx,
> >>
> >> Kate
> >>
> >>
> >
> >


_______________________________________________
dev-tech-xpcom mailing list
dev-tech-xpcom@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to