Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Cannot modify properties of a WrappedNative"

31 views
Skip to first unread message

John J. Barton

unread,
Nov 21, 2009, 12:16:58 PM11/21/09
to
In FF 3.6b4 I am getting an error on
win.tag = ChromebugOverrides.tagBase++; // set expando property
"NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN"

I guess this is Chromebug code called from Firebug if it matters.

So did the rules change or where they not what I thought.
jjb

Boris Zbarsky

unread,
Nov 21, 2009, 12:53:26 PM11/21/09
to

Nothing has changed recently that I know of.

What are the |win| and |ChromebugOverrides| objects in this case? Is it
the increment, or the tag set that's throwing?

-Boris

John J. Barton

unread,
Nov 21, 2009, 2:13:26 PM11/21/09
to
Boris Zbarsky wrote:
> On 11/21/09 12:16 PM, John J. Barton wrote:
>> In FF 3.6b4 I am getting an error on
>> win.tag = ChromebugOverrides.tagBase++; // set expando property
>> "NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN"
>>
>> I guess this is Chromebug code called from Firebug if it matters.
>>
>> So did the rules change or where they not what I thought.
>
> Nothing has changed recently that I know of.
>
> What are the |win| and |ChromebugOverrides| objects in this case?
win.toString:
[xpconnect wrapped (nsISupports, nsIHttpChannel, nsIUploadChannel,
nsITraceableChannel, nsIRequest)]
Looks like it is
Ci.nsIWebProgress.DOMWindow
ChromebugOverrides.toString:
[object Object]
Looks like a vanilla object in an extension.

> Is it
> the increment, or the tag set that's throwing?

win.tag = ChromebugOverrides.tagBase;
The tag set.

I wrote this recently, so I guess I just can't do this.
jjb

Boris Zbarsky

unread,
Nov 21, 2009, 2:56:00 PM11/21/09
to
On 11/21/09 2:13 PM, John J. Barton wrote:
> win.toString:
> [xpconnect wrapped (nsISupports, nsIHttpChannel, nsIUploadChannel,
> nsITraceableChannel, nsIRequest)]

Right. That's a non-DOM XPCOM object. You can't set expando properties
on those.

> Looks like it is
> Ci.nsIWebProgress.DOMWindow

Uh... That seems pretty unlikely. The object you have is an
nsHttpChannel, not a window.

> ChromebugOverrides.toString:
> [object Object]
> Looks like a vanilla object in an extension.

That should work fine.

> I wrote this recently, so I guess I just can't do this.

Not if win is a channel, no.

-Boris

0 new messages