#0 nsXULDocument::GetElementById (this=0xa24c000, aId=@0xbffcdac4,
aReturn=0xbffcd830)
#1 0x00366a65 in NS_InvokeByIndex_P ()
#2 0x0726f457 in XPCWrappedNative::CallMethod (ccx=@0xbffcda50,
mode=XPCWrappedNative::CALL_METHOD)
[...]
#19 0x001aaa7f in JS_CallFunctionValue (cx=0xa010c80, obj=0x9ecd140,
fval=166517248, argc=0, argv=0x0, rval=0xbffcfbb8)
#20 0x08635746 in nsXBLProtoImplAnonymousMethod::Execute (this=0xa5bd1a0,
aBoundElement=0xa27a6d0)
#21 0x0862a291 in nsXBLPrototypeBinding::BindingAttached (this=0x9f98800,
aBoundElement=0xa27a6d0)
#22 0x08623637 in nsXBLBinding::ExecuteAttachedHandler (this=0xa451480)
#23 0x086e6676 in nsElementSH::PostCreate (this=0x9ace680, wrapper=0x9f80180,
cx=0x9676360, obj=0x9ecd140)
#24 0x07274565 in XPCWrappedNative::GetNewOrUsed (ccx=@0xbffd0058,
Object=0xa27a6d0, Scope=0x9b50200, Interface=0x96d3f00, isGlobal=0,
resultWrapper=0xbffcffbc)
[...]
#27 0x07221f40 in nsXPConnect::WrapNative (this=0x96edbc0,
aJSContext=0x9676360, aScope=0x996a1a0, aCOMObj=0xa27a6d0,
aIID=@0x897f890, _retval=0xbffd0120)
#28 0x086df602 in nsDOMClassInfo::WrapNative (cx=0x9676360, scope=0x996a1a0,
native=0xa27a6d0, aIID=@0x897f890, vp=0xbffd0190, aHolder=0xbffd018c)
#29 0x086e05de in nsNodeSH::PreCreate (this=0x9ace680, nativeObj=0xa25c910,
cx=0x9676360, globalObj=0x996a1a0, parentObj=0xbffd0294)
#30 0x07273d20 in XPCWrappedNative::GetNewOrUsed (ccx=@0xbffd03d8,
Object=0xa25c910, Scope=0x999e380, Interface=0x96d3f00, isGlobal=0,
resultWrapper=0xbffd033c)
[...]
#38 0x086df602 in nsDOMClassInfo::WrapNative (cx=0x9676360, scope=0x996a1a0,
native=0xa25c9a0, aIID=@0x897f890, vp=0xbffd0890, aHolder=0xbffd088c)
#39 0x086e05de in nsNodeSH::PreCreate (this=0x9ace680, nativeObj=0xa25c9d0,
cx=0x9676360, globalObj=0x996a1a0, parentObj=0xbffd0994)
#40 0x07273d20 in XPCWrappedNative::GetNewOrUsed (ccx=@0xbffd0bf0,
Object=0xa25c9ec, Scope=0x999e380, Interface=0x96d3f00, isGlobal=0,
resultWrapper=0xbffd0a3c)
#41 0x072449ff in XPCConvert::NativeInterface2JSObject (ccx=@0xbffd0bf0,
dest=0xbffd0b10, src=0xa25c9ec, iid=0xbffd0d40, scope=0x99ce6e0,
allowNativeWrapper=1, isGlobal=0, pErr=0x0)
#42 0x07248282 in XPCConvert::NativeData2JS (ccx=@0xbffd0bf0, d=0xbffd0cec,
s=0xbffd0ee8, type=@0xbffd0d71, iid=0xbffd0d40, scope=0x99ce6e0, pErr=0x0)
#43 0x072672f4 in nsXPCWrappedJSClass::CallMethod (this=0x99ff910,
wrapper=0x9c5a5c0, methodIndex=3, info=0x99ee1a8, nativeParams=0xbffd0ed0)
#44 0x0725ec71 in nsXPCWrappedJS::CallMethod (this=0x9c5a5c0, methodIndex=3,
info=0x99ee1a8, params=0xbffd0ed0)
#45 0x003678f6 in PrepareAndDispatch (methodIndex=3, self=0x9c4a630,
args=0xbffd0f94)
#46 0x083f1db4 in nsContentPolicy::CheckPolicy (this=0x9999f70,
policyMethod=<error reading variable>, contentType=6,
contentLocation=0xa263ab0, requestingLocation=0xa1ed0e0,
requestingContext=0xa25c9ec, mimeType=@0x3aa410, extra=0x0,
decision=0xbffd13fe)
#47 0x083f10c2 in nsContentPolicy::ShouldLoad (this=0x9999f70, contentType=6,
contentLocation=0xa263ab0, requestingLocation=0x0,
requestingContext=0xa25c9ec, mimeType=@0x3aa410, extra=0x0,
decision=0xbffd13fe)
#48 0x077ed45d in NS_CheckContentLoadPolicy (contentType=6,
contentLocation=0xa263ab0, originPrincipal=0x0, context=0xa25c9ec,
mimeType=@0x3aa410, extra=0x0, decision=0xbffd13fe, policyService=0x0,
aSecMan=0x0)
#49 0x077ccb17 in nsDocShell::InternalLoad (this=0x96413e0, aURI=0xa263ab0,
aReferrer=0x0, aOwner=0x0, aFlags=1, aWindowTarget=0x961f2b8,
aTypeHint=0x0, aPostData=0x0, aHeadersData=0x0, aLoadType=1, aSHEntry=0x0,
aFirstParty=0, aDocShell=0x0, aRequest=0x0)
[...]
#54 0x084471a8 in nsFrameLoader::LoadFrame (this=0xa41e4c0)
#55 0x087a2551 in nsXULElement::LoadSrc (this=0xa25c9d0)
#56 0x087a4eeb in nsXULElement::BindToTree (this=0xa25c9d0,
aDocument=0xa24c000, aParent=0xa25c9a0, aBindingParent=0x0,
aCompileEventHandlers=1)
#57 0x08457fa5 in nsGenericElement::doInsertChildAt (aKid=0xa25c9d0, aIndex=0,
aNotify=0, aParent=0xa25c9a0, aDocument=0xa24c000, aChildArray=@0xa25c9b8)
#58 0x08458210 in nsGenericElement::InsertChildAt (this=0xa25c9a0,
aKid=0xa25c9d0, aIndex=0, aNotify=0)
#59 0x087a2f00 in nsXULElement::InsertChildAt (this=0xa25c9a0, aKid=0xa25c9d0,
aIndex=0, aNotify=0)
#60 0x0812c5eb in nsINode::AppendChildTo (this=0xa25c9a0, aKid=0xa25c9d0,
aNotify=0)
#61 0x0865fd1f in nsXULDocument::ResumeWalk (this=0xa24c000)
#62 0x08660ce2 in nsXULDocument::OnStreamComplete ()
So it looks like we're executing an XBL constructor sooner than we should because of the content policy check that goes out into JS and thus wraps a DOM node... Cc:ing Jonas as he's been all over the XBL code recently.
Here's the JS stack when we get the error about getElementById( "dontShowPrivac yStatement" ) returning null:
1 setPrivacyPref() ["chrome: //reporter/ content/ reportWizard. js":118] //global/ content/ bindings/ wizard. xml":410] //global/ content/ bindings/ wizard. xml":411] //global/ content/ bindings/ wizard. xml":257] //reporter/ content/ reportWizard. js":98] //global/ content/ bindings/ wizard. xml":410] //global/ content/ bindings/ wizard. xml":411] //global/ content/ bindings/ wizard. xml":94] //global/ content/ bindings/ wizard. xml":284] //global/ content/ bindings/ wizard. xml":199]
2 anonymous(event = [object Event @ 0xa086c80 (native @ 0xa428b50)]) ["chrome:
3 _fireEvent(aType = "pageadvanced", aTarget = [object XULElement @ 0x9fcac80 (native @ 0xa25c910)]) ["chrome:
4 advance(aPageId = undefined) ["chrome:
5 initPrivacyNotice() ["chrome:
6 anonymous(event = [object Event @ 0xa02c440 (native @ 0xa422940)]) ["chrome:
7 _fireEvent(aType = "pageshow", aTarget = [object XULElement @ 0x9fcac80 (native @ 0xa25c910)]) ["chrome:
8 set_currentPage(val = [object XULElement @ 0x9fcac80 (native @ 0xa25c910)]) ["chrome:
9 advance(aPageId = undefined) ["chrome:
10 () ["chrome:
And the C++ stack is rougly this:
#0 nsXULDocument: :GetElementById (this=0xa24c000, aId=@0xbffcdac4, 0xbffcd830) e::CallMethod (ccx=@0xbffcda50, XPCWrappedNativ e::CALL_ METHOD) Value (cx=0xa010c80, obj=0x9ecd140, nonymousMethod: :Execute (this=0xa5bd1a0, nt=0xa27a6d0) inding: :BindingAttache d (this=0x9f98800, nt=0xa27a6d0) :ExecuteAttache dHandler (this=0xa451480) :PostCreate (this=0x9ace680, wrapper=0x9f80180, e::GetNewOrUsed (ccx=@0xbffd0058, 0xa27a6d0, Scope=0x9b50200, Interface= 0x96d3f00, isGlobal=0, er=0xbffcffbc) :WrapNative (this=0x96edbc0, 0x9676360, aScope=0x996a1a0, aCOMObj=0xa27a6d0, @0x897f890, _retval=0xbffd0120) :WrapNative (cx=0x9676360, scope=0x996a1a0, 0xa27a6d0, aIID=@0x897f890, vp=0xbffd0190, aHolder=0xbffd018c) 0xa25c910, 0x996a1a0, parentObj= 0xbffd0294) e::GetNewOrUsed (ccx=@0xbffd03d8, 0xa25c910, Scope=0x999e380, Interface= 0x96d3f00, isGlobal=0, er=0xbffd033c) :WrapNative (cx=0x9676360, scope=0x996a1a0, 0xa25c9a0, aIID=@0x897f890, vp=0xbffd0890, aHolder=0xbffd088c) 0xa25c9d0, 0x996a1a0, parentObj= 0xbffd0994) e::GetNewOrUsed (ccx=@0xbffd0bf0, 0xa25c9ec, Scope=0x999e380, Interface= 0x96d3f00, isGlobal=0, er=0xbffd0a3c) :NativeInterfac e2JSObject (ccx=@0xbffd0bf0, 0xbffd0b10, src=0xa25c9ec, iid=0xbffd0d40, scope=0x99ce6e0, Wrapper= 1, isGlobal=0, pErr=0x0) :NativeData2JS (ccx=@0xbffd0bf0, d=0xbffd0cec, lass::CallMetho d (this=0x99ff910, 0x9c5a5c0, methodIndex=3, info=0x99ee1a8, nativeParams= 0xbffd0ed0) :CallMethod (this=0x9c5a5c0, methodIndex=3, 0xbffd0f94) ::CheckPolicy (this=0x9999f70, d=<error reading variable>, contentType=6, tion=0xa263ab0, requestingLocat ion=0xa1ed0e0, ontext= 0xa25c9ec, mimeType=@0x3aa410, extra=0x0, 0xbffd13fe) ::ShouldLoad (this=0x9999f70, contentType=6, tion=0xa263ab0, requestingLocat ion=0x0, ontext= 0xa25c9ec, mimeType=@0x3aa410, extra=0x0, 0xbffd13fe) LoadPolicy (contentType=6, tion=0xa263ab0, originPrincipal =0x0, context=0xa25c9ec, @0x3aa410, extra=0x0, decision= 0xbffd13fe, policyService=0x0, :InternalLoad (this=0x96413e0, aURI=0xa263ab0, 0x961f2b8, :LoadFrame (this=0xa41e4c0) :LoadSrc (this=0xa25c9d0) :BindToTree (this=0xa25c9d0, 0xa24c000, aParent=0xa25c9a0, aBindingParent=0x0, ntHandlers= 1) t::doInsertChil dAt (aKid=0xa25c9d0, aIndex=0, 0xa24c000, aChildArray= @0xa25c9b8) t::InsertChildA t (this=0xa25c9a0, :InsertChildAt (this=0xa25c9a0, aKid=0xa25c9d0, :AppendChildTo (this=0xa25c9a0, aKid=0xa25c9d0, :ResumeWalk (this=0xa24c000) :OnStreamComple te ()
aReturn=
#1 0x00366a65 in NS_InvokeByIndex_P ()
#2 0x0726f457 in XPCWrappedNativ
mode=
[...]
#19 0x001aaa7f in JS_CallFunction
fval=166517248, argc=0, argv=0x0, rval=0xbffcfbb8)
#20 0x08635746 in nsXBLProtoImplA
aBoundEleme
#21 0x0862a291 in nsXBLPrototypeB
aBoundEleme
#22 0x08623637 in nsXBLBinding:
#23 0x086e6676 in nsElementSH:
cx=0x9676360, obj=0x9ecd140)
#24 0x07274565 in XPCWrappedNativ
Object=
resultWrapp
[...]
#27 0x07221f40 in nsXPConnect:
aJSContext=
aIID=
#28 0x086df602 in nsDOMClassInfo:
native=
#29 0x086e05de in nsNodeSH::PreCreate (this=0x9ace680, nativeObj=
cx=0x9676360, globalObj=
#30 0x07273d20 in XPCWrappedNativ
Object=
resultWrapp
[...]
#38 0x086df602 in nsDOMClassInfo:
native=
#39 0x086e05de in nsNodeSH::PreCreate (this=0x9ace680, nativeObj=
cx=0x9676360, globalObj=
#40 0x07273d20 in XPCWrappedNativ
Object=
resultWrapp
#41 0x072449ff in XPCConvert:
dest=
allowNative
#42 0x07248282 in XPCConvert:
s=0xbffd0ee8, type=@0xbffd0d71, iid=0xbffd0d40, scope=0x99ce6e0, pErr=0x0)
#43 0x072672f4 in nsXPCWrappedJSC
wrapper=
#44 0x0725ec71 in nsXPCWrappedJS:
info=0x99ee1a8, params=0xbffd0ed0)
#45 0x003678f6 in PrepareAndDispatch (methodIndex=3, self=0x9c4a630,
args=
#46 0x083f1db4 in nsContentPolicy
policyMetho
contentLoca
requestingC
decision=
#47 0x083f10c2 in nsContentPolicy
contentLoca
requestingC
decision=
#48 0x077ed45d in NS_CheckContent
contentLoca
mimeType=
aSecMan=0x0)
#49 0x077ccb17 in nsDocShell:
aReferrer=0x0, aOwner=0x0, aFlags=1, aWindowTarget=
aTypeHint=0x0, aPostData=0x0, aHeadersData=0x0, aLoadType=1, aSHEntry=0x0,
aFirstParty=0, aDocShell=0x0, aRequest=0x0)
[...]
#54 0x084471a8 in nsFrameLoader:
#55 0x087a2551 in nsXULElement:
#56 0x087a4eeb in nsXULElement:
aDocument=
aCompileEve
#57 0x08457fa5 in nsGenericElemen
aNotify=0, aParent=0xa25c9a0, aDocument=
#58 0x08458210 in nsGenericElemen
aKid=0xa25c9d0, aIndex=0, aNotify=0)
#59 0x087a2f00 in nsXULElement:
aIndex=0, aNotify=0)
#60 0x0812c5eb in nsINode:
aNotify=0)
#61 0x0865fd1f in nsXULDocument:
#62 0x08660ce2 in nsXULDocument:
So it looks like we're executing an XBL constructor sooner than we should because of the content policy check that goes out into JS and thus wraps a DOM node... Cc:ing Jonas as he's been all over the XBL code recently.