Open Bug 1273058 Opened 8 years ago Updated 2 years ago

mContentViewer should be null when setting origin attributes on docshell

Categories

(Core :: Security, defect, P3)

defect

Tracking

()

Tracking Status
firefox49 --- affected
firefox57 --- fix-optional

People

(Reporter: allstars.chh, Assigned: baku)

References

(Blocks 1 open bug)

Details

(Whiteboard: [userContextId][OA])

Attachments

(1 file)

This is a follow-up by Bug 1250063, however there are some places has loaded about:blank before calling setOriginAttributes, see https://bugzilla.mozilla.org/show_bug.cgi?id=1250063#c22.

I'd fix those parts in this bug.
Priority: -- → P2
Whiteboard: [userContextId][OA]
Thread 1 "Web Content" hit Breakpoint 1, nsDocShell::SetupNewViewer (this=0x7ff0b3b68800, aNewViewer=0x7ff0b38f68e0) at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:9256
9256	  int32_t x = 0;
(gdb) bt
#0  0x00007ff0e31acae5 in nsDocShell::SetupNewViewer(nsIContentViewer*) (this=0x7ff0b3b68800, aNewViewer=0x7ff0b38f68e0) at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:9256
#1  0x00007ff0e31a4986 in nsDocShell::Embed(nsIContentViewer*, char const*, nsISupports*) (this=0x7ff0b3b68800, aContentViewer=0x7ff0b38f68e0, aCommand=0x7ff0e616c31f "", aExtraInfo=0x0)
    at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:7224
#2  0x00007ff0e31a7eba in nsDocShell::CreateAboutBlankContentViewer(nsIPrincipal*, nsIURI*, bool) (this=0x7ff0b3b68800, aPrincipal=0x0, aBaseURI=0x0, aTryToSaveOldPresentation=true)
    at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:8083
#3  0x00007ff0e31a76e3 in nsDocShell::EnsureContentViewer() (this=0x7ff0b3b68800) at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:7952
#4  0x00007ff0e319965a in nsDocShell::GetDocument() (this=0x7ff0b3b68800) at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:4498
#5  0x00007ff0e0377062 in nsPIDOMWindow<mozIDOMWindowProxy>::MaybeCreateDoc() (this=0x7ff0c5144820) at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:3608
#6  0x00007ff0de8c3e25 in nsPIDOMWindow<mozIDOMWindowProxy>::GetDoc() (this=0x7ff0c5144820) at /home/allstars/src/gecko-dev/dom/base/nsPIDOMWindow.h:174
#7  0x00007ff0df8f6a56 in nsPIDOMWindowOuter::EnsureInnerWindow() (this=0x7ff0c5144820) at /home/allstars/src/gecko-dev/dom/base/nsPIDOMWindow.h:840
#8  0x00007ff0e0373a88 in nsGlobalWindow::WrapObject(JSContext*, JS::Handle<JSObject*>) (this=0x7ff0c5144800, cx=0x7ff0ccaea000, aGivenProto=0x0) at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.h:357
#9  0x00007ff0df9543b4 in XPCConvert::NativeInterface2JSObject(JS::MutableHandle<JS::Value>, nsIXPConnectJSObjectHolder**, xpcObjectHelper&, nsID const*, bool, nsresult*) (d=JSVAL_NULL, dest=0x0, aHelper=..., iid=0x7fff6b968530, allowNativeWrapper=true, pErr=0x7fff6b9684bc) at /home/allstars/src/gecko-dev/js/xpconnect/src/XPCConvert.cpp:785
#10 0x00007ff0df952b4d in XPCConvert::NativeData2JS(JS::MutableHandle<JS::Value>, void const*, nsXPTType const&, nsID const*, nsresult*) (d=JSVAL_NULL, s=0x7fff6b968618, type=..., iid=0x7fff6b968530, pErr=0x7fff6b9684bc)
    at /home/allstars/src/gecko-dev/js/xpconnect/src/XPCConvert.cpp:344
#11 0x00007ff0df9d675f in CallMethodHelper::GatherAndConvertResults() (this=0x7fff6b9685d0) at /home/allstars/src/gecko-dev/js/xpconnect/src/XPCWrappedNative.cpp:1610
#12 0x00007ff0df9d5ba4 in CallMethodHelper::Call() (this=0x7fff6b9685d0) at /home/allstars/src/gecko-dev/js/xpconnect/src/XPCWrappedNative.cpp:1404
#13 0x00007ff0df9b8eb9 in XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) (ccx=..., mode=XPCWrappedNative::CALL_GETTER) at /home/allstars/src/gecko-dev/js/xpconnect/src/XPCWrappedNative.cpp:1360
#14 0x00007ff0df9d2ae9 in XPCWrappedNative::GetAttribute(XPCCallContext&) (ccx=...) at /home/allstars/src/gecko-dev/js/xpconnect/src/xpcprivate.h:1937
#15 0x00007ff0df9c29a8 in XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*) (cx=0x7ff0ccaea000, argc=0, vp=0x7fff6b968b28) at /home/allstars/src/gecko-dev/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:1164
#16 0x00007ff0e4de705d in js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) (cx=0x7ff0ccaea000, native=0x7ff0df9c258f <XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*)>, args=...) at /home/allstars/src/gecko-dev/js/src/jscntxtinlines.h:235
#17 0x00007ff0e4dabed8 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x7ff0ccaea000, args=..., construct=js::NO_CONSTRUCT) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:453
#18 0x00007ff0e4dac219 in InternalCall(JSContext*, js::AnyInvokeArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:498
#19 0x00007ff0e4dac2d3 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, fval=$jsval((JSObject *) 0x7ff0b3177f60 [object Function "content"]), thisv=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), args=..., rval=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:517
#20 0x00007ff0e4dacc22 in js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, thisv=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), getter=$jsval((JSObject *) 0x7ff0b3177f60 [object Function "content"]), rval=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:631
#21 0x00007ff0e4dd0f8c in CallGetter(JSContext*, JS::HandleObject, JS::HandleValue, js::HandleShape, JS::MutableHandleValue) (cx=0x7ff0ccaea000, obj=(JSObject * const) 0x7ff0c5682ca0 [object XPC_WN_ModsAllowed_Proto_JSClass] delegate, receiver=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), shape=0x7ff0b39b1040, vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/NativeObject.cpp:1737
#22 0x00007ff0e4dde4a2 in GetExistingProperty<(js::AllowGC)1>(JSContext*, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<js::Shape*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) (cx=0x7ff0ccaea000, receiver=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), obj=(js::NativeObject * const) 0x7ff0c5682ca0 [object XPC_WN_ModsAllowed_Proto_JSClass] delegate, shape=0x7ff0b39b1040, vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/NativeObject.cpp:1785
#23 0x00007ff0e4ddea23 in NativeGetPropertyInline<(js::AllowGC)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<jsid, (js::AllowGC)1>::HandleType, IsNameLookup, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) (cx=0x7ff0ccaea000, obj=(js::NativeObject * const) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate, receiver=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), id=$jsid("content"), nameLookup=NotNameLookup, vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/NativeObject.cpp:2012
#24 0x00007ff0e4dd1940 in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, obj=(js::NativeObject * const) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate, receiver=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), id=$jsid("content"), vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/NativeObject.cpp:2046
#25 0x00007ff0e46d648a in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, obj=(JSObject * const) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate, receiver=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), id=$jsid("content"), vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/NativeObject.h:1478
#26 0x00007ff0e4ce7820 in js::Wrapper::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) const (this=0x7ff0e86050c0 <js::CrossCompartmentWrapper::singleton>, cx=0x7ff0ccaea000, proxy=(JSObject * const) 0x7ff0c56a2760 [object Proxy], receiver=$jsval((JSObject *) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate), id=$jsid("content"), vp=JSVAL_VOID)
    at /home/allstars/src/gecko-dev/js/src/proxy/Wrapper.cpp:143
#27 0x00007ff0e4c8d3e7 in js::CrossCompartmentWrapper::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) const (this=0x7ff0e86050c0 <js::CrossCompartmentWrapper::singleton>, cx=0x7ff0ccaea000, wrapper=(JSObject * const) 0x7ff0c56a2760 [object Proxy], receiver=$jsval((JSObject *) 0x7ff0c56a2760 [object Proxy]), id=$jsid("content"), vp=JSVAL_VOID)
    at /home/allstars/src/gecko-dev/js/src/proxy/CrossCompartmentWrapper.cpp:209
#28 0x00007ff0e4c92095 in js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, proxy=(JSObject * const) 0x7ff0c56a2760 [object Proxy], receiver_=$jsval((JSObject *) 0x7ff0c56a2760 [object Proxy]), id=$jsid("content"), vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/proxy/Proxy.cpp:310
#29 0x00007ff0e4c937fe in js::proxy_GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, obj=(JSObject * const) 0x7ff0c56a2760 [object Proxy], receiver=$jsval((JSObject *) 0x7ff0c56a2760 [object Proxy]), id=$jsid("content"), vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/proxy/Proxy.cpp:583
#30 0x00007ff0e46d645b in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, obj=(JSObject * const) 0x7ff0c56a2760 [object Proxy], receiver=$jsval((JSObject *) 0x7ff0c56a2760 [object Proxy]), id=$jsid("content"), vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/NativeObject.h:1477
#31 0x00007ff0e46d4cd6 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, obj=(JSObject * const) 0x7ff0c56a2760 [object Proxy], receiver=$jsval((JSObject *) 0x7ff0c56a2760 [object Proxy]), name="content", vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/jsobj.h:836
#32 0x00007ff0e4dc335b in js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, v=$jsval((JSObject *) 0x7ff0c56a2760 [object Proxy]), name="content", vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:4169
#33 0x00007ff0e4daa4d5 in GetPropertyOperation(JSContext*, js::InterpreterFrame*, JS::HandleScript, jsbytecode*, JS::MutableHandleValue, JS::MutableHandleValue) (cx=0x7ff0ccaea000, fp=0x7ff0c5212200, script=0x7ff0b4643340, pc=0x7ff0ce8d6066 "5", lval=JSVAL_VOID, vp=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:189
#34 0x00007ff0e4db76ba in Interpret(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:2598
#35 0x00007ff0e4dabb31 in js::RunScript(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:399
#36 0x00007ff0e4dabf98 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x7ff0ccaea000, args=..., construct=js::NO_CONSTRUCT) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:471
#37 0x00007ff0e4dac219 in InternalCall(JSContext*, js::AnyInvokeArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:498
#38 0x00007ff0e4dac2d3 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, fval=$jsval((JSObject *) 0x7ff0b46c7a60 [object Function "init"]), thisv=$jsval((JSObject *) 0x7ff0b464c540 [object Object]), args=..., rval=$jsval((JSObject *) 0x7ff0b46c7a60 [object Function "init"])) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:517
#39 0x00007ff0e4ce7ac1 in js::Wrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) const (this=0x7ff0e86050c0 <js::CrossCompartmentWrapper::singleton>, cx=0x7ff0ccaea000, proxy=(JSObject * const) 0x7ff0c47cfb60 [object Proxy], args=...) at /home/allstars/src/gecko-dev/js/src/proxy/Wrapper.cpp:165
---Type <return> to continue, or q <return> to quit---
#40 0x00007ff0e4c8def1 in js::CrossCompartmentWrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) const (this=0x7ff0e86050c0 <js::CrossCompartmentWrapper::singleton>, cx=0x7ff0ccaea000, wrapper=(JSObject * const) 0x7ff0c47cfb60 [object Proxy], args=...) at /home/allstars/src/gecko-dev/js/src/proxy/CrossCompartmentWrapper.cpp:333
#41 0x00007ff0e4c929d6 in js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (cx=0x7ff0ccaea000, proxy=(JSObject * const) 0x7ff0c47cfb60 [object Proxy], args=...)
    at /home/allstars/src/gecko-dev/js/src/proxy/Proxy.cpp:401
#42 0x00007ff0e4c93ead in js::proxy_Call(JSContext*, unsigned int, JS::Value*) (cx=0x7ff0ccaea000, argc=1, vp=0x7ff0c5212128) at /home/allstars/src/gecko-dev/js/src/proxy/Proxy.cpp:690
#43 0x00007ff0e4de705d in js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) (cx=0x7ff0ccaea000, native=0x7ff0e4c93dd0 <js::proxy_Call(JSContext*, unsigned int, JS::Value*)>, args=...)
    at /home/allstars/src/gecko-dev/js/src/jscntxtinlines.h:235
#44 0x00007ff0e4dabddc in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x7ff0ccaea000, args=..., construct=js::NO_CONSTRUCT) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:441
#45 0x00007ff0e4dac219 in InternalCall(JSContext*, js::AnyInvokeArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:498
#46 0x00007ff0e4dac257 in js::CallFromStack(JSContext*, JS::CallArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:504
#47 0x00007ff0e4db98aa in Interpret(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:2881
#48 0x00007ff0e4dabb31 in js::RunScript(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:399
#49 0x00007ff0e4dad0be in js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) (cx=0x7ff0ccaea000, script=0x7ff0b317b580, scopeChainArg=(JSObject &) @0x7ff0b3994eb0 [object Block], newTargetValue=..., evalInFrame=AbstractFramePtr ((js::ScriptFrameIter::Data *) 0x0) = {...}, result=0x7fff6b96ab10) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:679
#50 0x00007ff0e4cb8e9d in js::ExecuteInGlobalAndReturnScope(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSScript*>, JS::MutableHandle<JSObject*>) (cx=0x7ff0ccaea000, global=(JSObject * const) 0x7ff0b315e060 [object ContentFrameMessageManager] delegate, scriptArg=0x7ff0b461e880, scopeArg=0x0) at /home/allstars/src/gecko-dev/js/src/builtin/Eval.cpp:502
#51 0x00007ff0e032c4d2 in nsMessageManagerScriptExecutor::LoadScriptInternal(nsAString_internal const&, bool) (this=0x7ff0b3ba2c08, aURL=..., aRunInGlobalScope=false)
    at /home/allstars/src/gecko-dev/dom/base/nsFrameMessageManager.cpp:1738
#52 0x00007ff0e2205eb3 in mozilla::dom::TabChild::RecvLoadRemoteScript(nsString const&, bool const&) (this=0x7ff0b3ba2c00, aURL=u"chrome://browser/content/tab-content.js", aRunInGlobalScope=@0x7ff0b32ddca8: false)
    at /home/allstars/src/gecko-dev/dom/ipc/TabChild.cpp:2312
#53 0x00007ff0e21c5805 in mozilla::dom::ContentChild::ProvideWindowCommon(mozilla::dom::TabChild*, mozIDOMWindowProxy*, bool, unsigned int, bool, bool, bool, nsIURI*, nsAString_internal const&, nsACString_internal const&, bool*, mozIDOMWindowProxy**) (this=0x7ff0d209d020, aTabOpener=0x7ff0c25a3c00, aParent=0x7ff0b3318020, aIframeMoz=false, aChromeFlags=4094, aCalledFromJS=true, aPositionSpecified=false, aSizeSpecified=false, aURI=0x7ff0b32ba000, aName=..., aFeatures=..., aWindowIsNew=0x7fff6b96b36d, aReturn=0x7fff6b96b4a0) at /home/allstars/src/gecko-dev/dom/ipc/ContentChild.cpp:845
#54 0x00007ff0e220132a in mozilla::dom::TabChild::ProvideWindow(mozIDOMWindowProxy*, unsigned int, bool, bool, bool, nsIURI*, nsAString_internal const&, nsACString_internal const&, bool*, mozIDOMWindowProxy**) (this=0x7ff0c25a3c00, aParent=0x7ff0b3318020, aChromeFlags=4094, aCalledFromJS=true, aPositionSpecified=false, aSizeSpecified=false, aURI=0x7ff0b32ba000, aName=..., aFeatures=..., aWindowIsNew=0x7fff6b96b36d, aReturn=0x7fff6b96b4a0)
    at /home/allstars/src/gecko-dev/dom/ipc/TabChild.cpp:1170
#55 0x00007ff0e31ee8c7 in nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, float*, mozIDOMWindowProxy**) (this=0x7ff0c25b31a0, aParent=0x7ff0b3318020, aUrl=0x7ff0b4704b48 "file_other_auxiliary_navigation_by_location.html", aName=0x7fff6b96b9b0 "otherWindow", aFeatures=0x0, aCalledFromJS=true, aDialog=false, aNavigate=true, aArgv=0x0, aOpenerFullZoom=0x0, aResult=0x7fff6b96b870)
    at /home/allstars/src/gecko-dev/embedding/components/windowwatcher/nsWindowWatcher.cpp:900
#56 0x00007ff0e31ed1a3 in nsWindowWatcher::OpenWindow2(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsISupports*, float, unsigned char, mozIDOMWindowProxy**) (this=0x7ff0c25b31a0, aParent=0x7ff0b3318020, aUrl=0x7ff0b4704b48 "file_other_auxiliary_navigation_by_location.html", aName=0x7fff6b96b9b0 "otherWindow", aFeatures=0x0, aCalledFromScript=true, aDialog=false, aNavigate=true, aArguments=0x0, aOpenerFullZoom=1, aOptionalArgc=0 '\000', aResult=0x7fff6b96b870) at /home/allstars/src/gecko-dev/embedding/components/windowwatcher/nsWindowWatcher.cpp:461
#57 0x00007ff0e036778a in nsGlobalWindow::OpenInternal(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, bool, bool, bool, bool, bool, nsIArray*, nsISupports*, nsPIDOMWindowOuter**) (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., aDialog=false, aContentModal=false, aCalledNoScript=false, aDoJSFixups=true, aNavigate=true, argv=0x0, aExtraArgument=0x0, aReturn=0x7fff6b96bae0)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:11816
#58 0x00007ff0e03576e3 in nsGlobalWindow::OpenJS(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, nsPIDOMWindowOuter**) (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., _retval=0x7fff6b96bae0)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:8087
#59 0x00007ff0e0357366 in nsGlobalWindow::OpenOuter(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, mozilla::ErrorResult&) (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., aError=...)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:8046
#60 0x00007ff0e035749f in nsGlobalWindow::Open(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, mozilla::ErrorResult&) (this=0x7ff0b4bc5800, aUrl=..., aName=..., aOptions=..., aError=...)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:8055
#61 0x00007ff0e10bbdbd in mozilla::dom::WindowBinding::open(JSContext*, JS::Handle<JSObject*>, nsGlobalWindow*, JSJitMethodCallArgs const&) (cx=0x7ff0ccaea000, obj=(JSObject * const) 0x7ff0b460d320 [object Proxy], self=0x7ff0b4bc5800, args=...) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/bindings/WindowBinding.cpp:2193
#62 0x00007ff0e10e16eb in mozilla::dom::WindowBinding::genericMethod(JSContext*, unsigned int, JS::Value*) (cx=0x7ff0ccaea000, argc=2, vp=0x7ff0c5212090)
    at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/bindings/WindowBinding.cpp:14625
#63 0x00007ff0e4de705d in js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) (cx=0x7ff0ccaea000, native=0x7ff0e10e1436 <mozilla::dom::WindowBinding::genericMethod(JSContext*, unsigned int, JS::Value*)>, args=...) at /home/allstars/src/gecko-dev/js/src/jscntxtinlines.h:235
#64 0x00007ff0e4dabed8 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x7ff0ccaea000, args=..., construct=js::NO_CONSTRUCT) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:453
#65 0x00007ff0e4dac219 in InternalCall(JSContext*, js::AnyInvokeArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:498
#66 0x00007ff0e4dac257 in js::CallFromStack(JSContext*, JS::CallArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:504
#67 0x00007ff0e4db98aa in Interpret(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:2881
#68 0x00007ff0e4dabb31 in js::RunScript(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:399
#69 0x00007ff0e4dabf98 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x7ff0ccaea000, args=..., construct=js::NO_CONSTRUCT) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:471
#70 0x00007ff0e4dac219 in InternalCall(JSContext*, js::AnyInvokeArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:498
#71 0x00007ff0e4dac2d3 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, fval=$jsval((JSObject *) 0x7ff0b3139080 [object Function "window.onload"]), thisv=$jsval((JSObject *) 0x7ff0b460d320 [object Proxy]), args=..., rval=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:517
#72 0x00007ff0e4b2004e in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, thisv=$jsval((JSObject *) 0x7ff0b460d320 [object Proxy]), fval=$jsval((JSObject *) 0x7ff0b3139080 [object Function "window.onload"]), args=..., rval=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/jsapi.cpp:2840
#73 0x00007ff0e133b8c6 in mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) (this=0x7ff0b4587a00, cx=0x7ff0ccaea000, aThisVal=$jsval((JSObject *) 0x7ff0b460d320 [object Proxy]), event=..., aRetVal=JSVAL_VOID, aRv=...) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/bindings/EventHandlerBinding.cpp:259
#74 0x00007ff0e180011c in mozilla::dom::EventHandlerNonNull::Call<nsISupports*>(nsISupports* const&, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JSCompartment*) (this=0x7ff0b4587a00, thisVal=@0x7ff0b36c5688: 0x7ff0b4bc5800, event=..., aRetVal=JSVAL_VOID, aRv=..., aExecutionReason=0x7ff0e5b4e792 "EventHandlerNonNull", aExceptionHandling=mozilla::dom::CallbackObject::eReportExceptions, aCompartment=0x0) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/EventHandlerBinding.h:361
#75 0x00007ff0e17eeb54 in mozilla::JSEventHandler::HandleEvent(nsIDOMEvent*) (this=0x7ff0b36c5670, aEvent=0x7ff0c30915e0) at /home/allstars/src/gecko-dev/dom/events/JSEventHandler.cpp:214
#76 0x00007ff0e17db194 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) (this=0x7ff0b3549500, aListener=0x7ff0d086df08, aDOMEvent=0x7ff0c30915e0, aCurrentTarget=0x7ff0b4bc5800) at /home/allstars/src/gecko-dev/dom/events/EventListenerManager.cpp:1133
---Type <return> to continue, or q <return> to quit---
#77 0x00007ff0e17db999 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) (this=0x7ff0b3549500, aPresContext=0x7ff0b38ab800, aEvent=0x7fff6b96d6b0, aDOMEvent=0x7fff6b96d550, aCurrentTarget=0x7ff0b4bc5800, aEventStatus=0x7fff6b96d558) at /home/allstars/src/gecko-dev/dom/events/EventListenerManager.cpp:1286
#78 0x00007ff0e17ca8e8 in mozilla::EventListenerManager::HandleEvent(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) (this=0x7ff0b3549500, aPresContext=0x7ff0b38ab800, aEvent=0x7fff6b96d6b0, aDOMEvent=0x7fff6b96d550, aCurrentTarget=0x7ff0b4bc5800, aEventStatus=0x7fff6b96d558) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/EventListenerManager.h:375
#79 0x00007ff0e17cfff0 in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) (this=0x7ff0b47d2008, aVisitor=..., aCd=...)
    at /home/allstars/src/gecko-dev/dom/events/EventDispatcher.cpp:277
#80 0x00007ff0e17c6373 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) (aChain=nsTArray<mozilla::EventTargetChainItem> & = {...}, aVisitor=..., aCallback=0x0, aCd=...) at /home/allstars/src/gecko-dev/dom/events/EventDispatcher.cpp:379
#81 0x00007ff0e17c7749 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) (aTarget=0x7ff0b3318020, aPresContext=0x7ff0b38ab800, aEvent=0x7fff6b96d6b0, aDOMEvent=0x0, aEventStatus=0x7fff6b96d618, aCallback=0x0, aTargets=0x0) at /home/allstars/src/gecko-dev/dom/events/EventDispatcher.cpp:711
#82 0x00007ff0e2a9cd8a in nsDocumentViewer::LoadComplete(nsresult) (this=0x7ff0b38f3e20, aStatus=nsresult::NS_OK) at /home/allstars/src/gecko-dev/layout/base/nsDocumentViewer.cpp:996
#83 0x00007ff0e31a61a1 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) (this=0x7ff0b2705000, aProgress=0x7ff0b2705028, aChannel=0x7ff0b381d888, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:7602
#84 0x00007ff0e31a55a0 in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) (this=0x7ff0b2705000, aProgress=0x7ff0b2705028, aRequest=0x7ff0b381d888, aStateFlags=131088, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:7403
#85 0x00007ff0dfc6fe8b in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) (this=0x7ff0b2705000, aProgress=0x7ff0b2705028, aRequest=0x7ff0b381d888, aStateFlags=@0x7fff6b96de14: 131088, aStatus=nsresult::NS_OK) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:1252
#86 0x00007ff0dfc6e7c2 in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) (this=0x7ff0b2705000, request=0x7ff0b381d888, aStatus=nsresult::NS_OK) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:836
#87 0x00007ff0dfc6e23e in nsDocLoader::DocLoaderIsEmpty(bool) (this=0x7ff0b2705000, aFlushLayout=true) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:726
#88 0x00007ff0dfc74e9b in nsDocLoader::ChildDoneWithOnload(nsIDocumentLoader*) (this=0x7ff0b2705000, aChild=0x7ff0b4545000) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.h:201
#89 0x00007ff0dfc6e269 in nsDocLoader::DocLoaderIsEmpty(bool) (this=0x7ff0b4545000, aFlushLayout=true) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:729
#90 0x00007ff0dfc6dcc5 in nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) (this=0x7ff0b4545000, aRequest=0x7ff0b321a7c0, aCtxt=0x0, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:608
#91 0x00007ff0de9ccd89 in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) (this=0x7ff0b359d360, request=0x7ff0b321a7c0, ctxt=0x0, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/netwerk/base/nsLoadGroup.cpp:633
#92 0x00007ff0e05145fd in nsDocument::DoUnblockOnload() (this=0x7ff0b38f1000) at /home/allstars/src/gecko-dev/dom/base/nsDocument.cpp:9155
#93 0x00007ff0e05142cd in nsDocument::UnblockOnload(bool) (this=0x7ff0b38f1000, aFireSync=true) at /home/allstars/src/gecko-dev/dom/base/nsDocument.cpp:9083
#94 0x00007ff0e0503df4 in nsDocument::DispatchContentLoadedEvents() (this=0x7ff0b38f1000) at /home/allstars/src/gecko-dev/dom/base/nsDocument.cpp:5225
#95 0x00007ff0e05af72b in mozilla::detail::RunnableMethodArguments<>::applyImpl<nsDocument, void (nsDocument::*)()>(nsDocument*, void (nsDocument::*)(), mozilla::Tuple<>&, mozilla::IndexSequence<>) (o=0x7ff0b38f1000, m=(void (nsDocument::*)(nsDocument * const)) 0x7ff0e050366e <nsDocument::DispatchContentLoadedEvents()>, args=...) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:729
#96 0x00007ff0e05af5f7 in mozilla::detail::RunnableMethodArguments<>::apply<nsDocument, void (nsDocument::*)()>(nsDocument*, void (nsDocument::*)()) (this=0x7ff0b45ec2f0, o=0x7ff0b38f1000, m=(void (nsDocument::*)(nsDocument * const)) 0x7ff0e050366e <nsDocument::DispatchContentLoadedEvents()>) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:736
#97 0x00007ff0e05af2f7 in mozilla::detail::RunnableMethodImpl<void (nsDocument::*)(), true, false>::Run() (this=0x7ff0b45ec2c0) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:764
#98 0x00007ff0de88a0c6 in nsThread::ProcessNextEvent(bool, bool*) (this=0x7ff0d08b9400, aMayWait=false, aResult=0x7fff6b96e577) at /home/allstars/src/gecko-dev/xpcom/threads/nsThread.cpp:1058
#99 0x00007ff0de8f9af9 in NS_ProcessNextEvent(nsIThread*, bool) (aThread=0x7ff0d08b9400, aMayWait=false) at /home/allstars/src/gecko-dev/xpcom/glue/nsThreadUtils.cpp:290
#100 0x00007ff0df09434c in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (this=0x7ff0d20756f0, aDelegate=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/glue/MessagePump.cpp:96
#101 0x00007ff0df094d96 in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (this=0x7ff0d20756f0, aDelegate=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/glue/MessagePump.cpp:301
#102 0x00007ff0deffb8fc in MessageLoop::RunInternal() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:232
#103 0x00007ff0deffb880 in MessageLoop::RunHandler() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:225
#104 0x00007ff0deffb844 in MessageLoop::Run() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:205
#105 0x00007ff0e260543a in nsBaseAppShell::Run() (this=0x7ff0c4698eb0) at /home/allstars/src/gecko-dev/widget/nsBaseAppShell.cpp:156
#106 0x00007ff0e3763b53 in XRE_RunAppShell() () at /home/allstars/src/gecko-dev/toolkit/xre/nsEmbedFunctions.cpp:846
#107 0x00007ff0df094c2b in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (this=0x7ff0d20756f0, aDelegate=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/glue/MessagePump.cpp:269
#108 0x00007ff0deffb8fc in MessageLoop::RunInternal() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:232
#109 0x00007ff0deffb880 in MessageLoop::RunHandler() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:225
#110 0x00007ff0deffb844 in MessageLoop::Run() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:205
#111 0x00007ff0e3763575 in XRE_InitChildProcess(int, char**, XREChildData const*) (aArgc=3, aArgv=0x7fff6b96ec88, aChildData=0x7fff6b96eb30) at /home/allstars/src/gecko-dev/toolkit/xre/nsEmbedFunctions.cpp:676
#112 0x00000000004269ea in content_process_main(int, char**) (argc=5, argv=0x7fff6b96ec88) at /home/allstars/src/gecko-dev/ipc/app/../contentproc/plugin-container.cpp:197
#113 0x0000000000426ac7 in main(int, char**) (argc=6, argv=0x7fff6b96ec88) at /home/allstars/src/gecko-dev/ipc/app/MozillaRuntimeMain.cpp:18
(gdb) js
(gdb) c
Continuing.
[New Thread 0x7ff0b1e65700 (LWP 21643)]

Thread 1 "Web Content" hit Breakpoint 2, nsDocShell::SetOriginAttributes (this=0x7ff0b3b68800, aAttrs=...) at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:14228
14228	  printf("XXX SetOriginAttributes this=%p\n", this);
(gdb) bt
#0  0x00007ff0e31c22e8 in nsDocShell::SetOriginAttributes(mozilla::DocShellOriginAttributes const&) (this=0x7ff0b3b68800, aAttrs=...) at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:14228
#1  0x00007ff0e31ef805 in nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, float*, mozIDOMWindowProxy**) (this=0x7ff0c25b31a0, aParent=0x7ff0b3318020, aUrl=0x7ff0b4704b48 "file_other_auxiliary_navigation_by_location.html", aName=0x7fff6b96b9b0 "otherWindow", aFeatures=0x0, aCalledFromJS=true, aDialog=false, aNavigate=true, aArgv=0x0, aOpenerFullZoom=0x0, aResult=0x7fff6b96b870)
    at /home/allstars/src/gecko-dev/embedding/components/windowwatcher/nsWindowWatcher.cpp:1120
#2  0x00007ff0e31ed1a3 in nsWindowWatcher::OpenWindow2(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsISupports*, float, unsigned char, mozIDOMWindowProxy**) (this=0x7ff0c25b31a0, aParent=0x7ff0b3318020, aUrl=0x7ff0b4704b48 "file_other_auxiliary_navigation_by_location.html", aName=0x7fff6b96b9b0 "otherWindow", aFeatures=0x0, aCalledFromScript=true, aDialog=false, aNavigate=true, aArguments=0x0, aOpenerFullZoom=1, aOptionalArgc=0 '\000', aResult=0x7fff6b96b870) at /home/allstars/src/gecko-dev/embedding/components/windowwatcher/nsWindowWatcher.cpp:461
#3  0x00007ff0e036778a in nsGlobalWindow::OpenInternal(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, bool, bool, bool, bool, bool, nsIArray*, nsISupports*, nsPIDOMWindowOuter**) (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., aDialog=false, aContentModal=false, aCalledNoScript=false, aDoJSFixups=true, aNavigate=true, argv=0x0, aExtraArgument=0x0, aReturn=0x7fff6b96bae0)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:11816
#4  0x00007ff0e03576e3 in nsGlobalWindow::OpenJS(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, nsPIDOMWindowOuter**) (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., _retval=0x7fff6b96bae0)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:8087
#5  0x00007ff0e0357366 in nsGlobalWindow::OpenOuter(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, mozilla::ErrorResult&) (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., aError=...)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:8046
#6  0x00007ff0e035749f in nsGlobalWindow::Open(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, mozilla::ErrorResult&) (this=0x7ff0b4bc5800, aUrl=..., aName=..., aOptions=..., aError=...)
    at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:8055
#7  0x00007ff0e10bbdbd in mozilla::dom::WindowBinding::open(JSContext*, JS::Handle<JSObject*>, nsGlobalWindow*, JSJitMethodCallArgs const&) (cx=0x7ff0ccaea000, obj=(JSObject * const) 0x7ff0b460d320 [object Proxy], self=0x7ff0b4bc5800, args=...) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/bindings/WindowBinding.cpp:2193
#8  0x00007ff0e10e16eb in mozilla::dom::WindowBinding::genericMethod(JSContext*, unsigned int, JS::Value*) (cx=0x7ff0ccaea000, argc=2, vp=0x7ff0c5212090)
    at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/bindings/WindowBinding.cpp:14625
#9  0x00007ff0e4de705d in js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) (cx=0x7ff0ccaea000, native=0x7ff0e10e1436 <mozilla::dom::WindowBinding::genericMethod(JSContext*, unsigned int, JS::Value*)>, args=...) at /home/allstars/src/gecko-dev/js/src/jscntxtinlines.h:235
#10 0x00007ff0e4dabed8 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x7ff0ccaea000, args=..., construct=js::NO_CONSTRUCT) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:453
#11 0x00007ff0e4dac219 in InternalCall(JSContext*, js::AnyInvokeArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:498
#12 0x00007ff0e4dac257 in js::CallFromStack(JSContext*, JS::CallArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:504
#13 0x00007ff0e4db98aa in Interpret(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:2881
#14 0x00007ff0e4dabb31 in js::RunScript(JSContext*, js::RunState&) (cx=0x7ff0ccaea000, state=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:399
#15 0x00007ff0e4dabf98 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) (cx=0x7ff0ccaea000, args=..., construct=js::NO_CONSTRUCT) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:471
#16 0x00007ff0e4dac219 in InternalCall(JSContext*, js::AnyInvokeArgs const&) (cx=0x7ff0ccaea000, args=...) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:498
#17 0x00007ff0e4dac2d3 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, fval=$jsval((JSObject *) 0x7ff0b3139080 [object Function "window.onload"]), thisv=$jsval((JSObject *) 0x7ff0b460d320 [object Proxy]), args=..., rval=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/vm/Interpreter.cpp:517
#18 0x00007ff0e4b2004e in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) (cx=0x7ff0ccaea000, thisv=$jsval((JSObject *) 0x7ff0b460d320 [object Proxy]), fval=$jsval((JSObject *) 0x7ff0b3139080 [object Function "window.onload"]), args=..., rval=JSVAL_VOID) at /home/allstars/src/gecko-dev/js/src/jsapi.cpp:2840
#19 0x00007ff0e133b8c6 in mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) (this=0x7ff0b4587a00, cx=0x7ff0ccaea000, aThisVal=$jsval((JSObject *) 0x7ff0b460d320 [object Proxy]), event=..., aRetVal=JSVAL_VOID, aRv=...) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/bindings/EventHandlerBinding.cpp:259
#20 0x00007ff0e180011c in mozilla::dom::EventHandlerNonNull::Call<nsISupports*>(nsISupports* const&, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JSCompartment*) (this=0x7ff0b4587a00, thisVal=@0x7ff0b36c5688: 0x7ff0b4bc5800, event=..., aRetVal=JSVAL_VOID, aRv=..., aExecutionReason=0x7ff0e5b4e792 "EventHandlerNonNull", aExceptionHandling=mozilla::dom::CallbackObject::eReportExceptions, aCompartment=0x0) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/EventHandlerBinding.h:361
#21 0x00007ff0e17eeb54 in mozilla::JSEventHandler::HandleEvent(nsIDOMEvent*) (this=0x7ff0b36c5670, aEvent=0x7ff0c30915e0) at /home/allstars/src/gecko-dev/dom/events/JSEventHandler.cpp:214
#22 0x00007ff0e17db194 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) (this=0x7ff0b3549500, aListener=0x7ff0d086df08, aDOMEvent=0x7ff0c30915e0, aCurrentTarget=0x7ff0b4bc5800) at /home/allstars/src/gecko-dev/dom/events/EventListenerManager.cpp:1133
#23 0x00007ff0e17db999 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) (this=0x7ff0b3549500, aPresContext=0x7ff0b38ab800, aEvent=0x7fff6b96d6b0, aDOMEvent=0x7fff6b96d550, aCurrentTarget=0x7ff0b4bc5800, aEventStatus=0x7fff6b96d558) at /home/allstars/src/gecko-dev/dom/events/EventListenerManager.cpp:1286
#24 0x00007ff0e17ca8e8 in mozilla::EventListenerManager::HandleEvent(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) (this=0x7ff0b3549500, aPresContext=0x7ff0b38ab800, aEvent=0x7fff6b96d6b0, aDOMEvent=0x7fff6b96d550, aCurrentTarget=0x7ff0b4bc5800, aEventStatus=0x7fff6b96d558) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/EventListenerManager.h:375
#25 0x00007ff0e17cfff0 in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) (this=0x7ff0b47d2008, aVisitor=..., aCd=...)
    at /home/allstars/src/gecko-dev/dom/events/EventDispatcher.cpp:277
#26 0x00007ff0e17c6373 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) (aChain=nsTArray<mozilla::EventTargetChainItem> & = {...}, aVisitor=..., aCallback=0x0, aCd=...) at /home/allstars/src/gecko-dev/dom/events/EventDispatcher.cpp:379
#27 0x00007ff0e17c7749 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) (aTarget=0x7ff0b3318020, aPresContext=0x7ff0b38ab800, aEvent=0x7fff6b96d6b0, aDOMEvent=0x0, aEventStatus=0x7fff6b96d618, aCallback=0x0, aTargets=0x0) at /home/allstars/src/gecko-dev/dom/events/EventDispatcher.cpp:711
#28 0x00007ff0e2a9cd8a in nsDocumentViewer::LoadComplete(nsresult) (this=0x7ff0b38f3e20, aStatus=nsresult::NS_OK) at /home/allstars/src/gecko-dev/layout/base/nsDocumentViewer.cpp:996
#29 0x00007ff0e31a61a1 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) (this=0x7ff0b2705000, aProgress=0x7ff0b2705028, aChannel=0x7ff0b381d888, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:7602
#30 0x00007ff0e31a55a0 in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) (this=0x7ff0b2705000, aProgress=0x7ff0b2705028, aRequest=0x7ff0b381d888, aStateFlags=131088, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:7403
#31 0x00007ff0dfc6fe8b in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) (this=0x7ff0b2705000, aProgress=0x7ff0b2705028, aRequest=0x7ff0b381d888, aStateFlags=@0x7fff6b96de14: 131088, aStatus=nsresult::NS_OK) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:1252
#32 0x00007ff0dfc6e7c2 in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) (this=0x7ff0b2705000, request=0x7ff0b381d888, aStatus=nsresult::NS_OK) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:836
#33 0x00007ff0dfc6e23e in nsDocLoader::DocLoaderIsEmpty(bool) (this=0x7ff0b2705000, aFlushLayout=true) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:726
#34 0x00007ff0dfc74e9b in nsDocLoader::ChildDoneWithOnload(nsIDocumentLoader*) (this=0x7ff0b2705000, aChild=0x7ff0b4545000) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.h:201
#35 0x00007ff0dfc6e269 in nsDocLoader::DocLoaderIsEmpty(bool) (this=0x7ff0b4545000, aFlushLayout=true) at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:729
#36 0x00007ff0dfc6dcc5 in nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) (this=0x7ff0b4545000, aRequest=0x7ff0b321a7c0, aCtxt=0x0, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/uriloader/base/nsDocLoader.cpp:608
#37 0x00007ff0de9ccd89 in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) (this=0x7ff0b359d360, request=0x7ff0b321a7c0, ctxt=0x0, aStatus=nsresult::NS_OK)
    at /home/allstars/src/gecko-dev/netwerk/base/nsLoadGroup.cpp:633
---Type <return> to continue, or q <return> to quit---
#38 0x00007ff0e05145fd in nsDocument::DoUnblockOnload() (this=0x7ff0b38f1000) at /home/allstars/src/gecko-dev/dom/base/nsDocument.cpp:9155
#39 0x00007ff0e05142cd in nsDocument::UnblockOnload(bool) (this=0x7ff0b38f1000, aFireSync=true) at /home/allstars/src/gecko-dev/dom/base/nsDocument.cpp:9083
#40 0x00007ff0e0503df4 in nsDocument::DispatchContentLoadedEvents() (this=0x7ff0b38f1000) at /home/allstars/src/gecko-dev/dom/base/nsDocument.cpp:5225
#41 0x00007ff0e05af72b in mozilla::detail::RunnableMethodArguments<>::applyImpl<nsDocument, void (nsDocument::*)()>(nsDocument*, void (nsDocument::*)(), mozilla::Tuple<>&, mozilla::IndexSequence<>) (o=0x7ff0b38f1000, m=(void (nsDocument::*)(nsDocument * const)) 0x7ff0e050366e <nsDocument::DispatchContentLoadedEvents()>, args=...) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:729
#42 0x00007ff0e05af5f7 in mozilla::detail::RunnableMethodArguments<>::apply<nsDocument, void (nsDocument::*)()>(nsDocument*, void (nsDocument::*)()) (this=0x7ff0b45ec2f0, o=0x7ff0b38f1000, m=(void (nsDocument::*)(nsDocument * const)) 0x7ff0e050366e <nsDocument::DispatchContentLoadedEvents()>) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:736
#43 0x00007ff0e05af2f7 in mozilla::detail::RunnableMethodImpl<void (nsDocument::*)(), true, false>::Run() (this=0x7ff0b45ec2c0) at /home/allstars/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:764
#44 0x00007ff0de88a0c6 in nsThread::ProcessNextEvent(bool, bool*) (this=0x7ff0d08b9400, aMayWait=false, aResult=0x7fff6b96e577) at /home/allstars/src/gecko-dev/xpcom/threads/nsThread.cpp:1058
#45 0x00007ff0de8f9af9 in NS_ProcessNextEvent(nsIThread*, bool) (aThread=0x7ff0d08b9400, aMayWait=false) at /home/allstars/src/gecko-dev/xpcom/glue/nsThreadUtils.cpp:290
#46 0x00007ff0df09434c in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (this=0x7ff0d20756f0, aDelegate=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/glue/MessagePump.cpp:96
#47 0x00007ff0df094d96 in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (this=0x7ff0d20756f0, aDelegate=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/glue/MessagePump.cpp:301
#48 0x00007ff0deffb8fc in MessageLoop::RunInternal() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:232
#49 0x00007ff0deffb880 in MessageLoop::RunHandler() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:225
#50 0x00007ff0deffb844 in MessageLoop::Run() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:205
#51 0x00007ff0e260543a in nsBaseAppShell::Run() (this=0x7ff0c4698eb0) at /home/allstars/src/gecko-dev/widget/nsBaseAppShell.cpp:156
#52 0x00007ff0e3763b53 in XRE_RunAppShell() () at /home/allstars/src/gecko-dev/toolkit/xre/nsEmbedFunctions.cpp:846
#53 0x00007ff0df094c2b in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (this=0x7ff0d20756f0, aDelegate=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/glue/MessagePump.cpp:269
#54 0x00007ff0deffb8fc in MessageLoop::RunInternal() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:232
#55 0x00007ff0deffb880 in MessageLoop::RunHandler() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:225
#56 0x00007ff0deffb844 in MessageLoop::Run() (this=0x7fff6b96e930) at /home/allstars/src/gecko-dev/ipc/chromium/src/base/message_loop.cc:205
#57 0x00007ff0e3763575 in XRE_InitChildProcess(int, char**, XREChildData const*) (aArgc=3, aArgv=0x7fff6b96ec88, aChildData=0x7fff6b96eb30) at /home/allstars/src/gecko-dev/toolkit/xre/nsEmbedFunctions.cpp:676
#58 0x00000000004269ea in content_process_main(int, char**) (argc=5, argv=0x7fff6b96ec88) at /home/allstars/src/gecko-dev/ipc/app/../contentproc/plugin-container.cpp:197
#59 0x0000000000426ac7 in main(int, char**) (argc=6, argv=0x7fff6b96ec88) at /home/allstars/src/gecko-dev/ipc/app/MozillaRuntimeMain.cpp:18
(gdb) c
Continuing.

Thread 1 "Web Content" received signal SIGSEGV, Segmentation fault.
0x00007ff0e31c2348 in nsDocShell::SetOriginAttributes (this=0x7ff0b3b68800, aAttrs=...) at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:14229
14229	  MOZ_ASSERT(!mContentViewer);
(In reply to Yoshi Huang[:allstars.chh] from comment #1)
From the stack I found that in

Inside nsWindowWatcher::OpenWindowInternal()
http://searchfox.org/mozilla-central/rev/bb22cc4067c3832b943507497389b0b13d6f3a2b/embedding/components/windowwatcher/nsWindowWatcher.cpp#896

it will init the TabChild and then call
mozilla::dom::TabChild::RecvLoadRemoteScript, which will in turn call SetupNewViewer on the docshell (of the TabChild).

So calling docShell.SetOriginAttributes should be earlier than this.


> Thread 1 "Web Content" hit Breakpoint 1, nsDocShell::SetupNewViewer
> (this=0x7ff0b3b68800, aNewViewer=0x7ff0b38f68e0) at
> /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:9256
> 9256	  int32_t x = 0;
> (gdb) bt
> #0  0x00007ff0e31acae5 in nsDocShell::SetupNewViewer(nsIContentViewer*)
> (this=0x7ff0b3b68800, aNewViewer=0x7ff0b38f68e0) at
> /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:9256
> #1  0x00007ff0e31a4986 in nsDocShell::Embed(nsIContentViewer*, char const*,
> nsISupports*) (this=0x7ff0b3b68800, aContentViewer=0x7ff0b38f68e0,
> aCommand=0x7ff0e616c31f "", aExtraInfo=0x0)
>     at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:7224
> #2  0x00007ff0e31a7eba in
> nsDocShell::CreateAboutBlankContentViewer(nsIPrincipal*, nsIURI*, bool)
> (this=0x7ff0b3b68800, aPrincipal=0x0, aBaseURI=0x0,
> aTryToSaveOldPresentation=true)
>     at /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:8083
...
> #52 0x00007ff0e2205eb3 in
> mozilla::dom::TabChild::RecvLoadRemoteScript(nsString const&, bool const&)
> (this=0x7ff0b3ba2c00, aURL=u"chrome://browser/content/tab-content.js",
> aRunInGlobalScope=@0x7ff0b32ddca8: false)
>     at /home/allstars/src/gecko-dev/dom/ipc/TabChild.cpp:2312
> #53 0x00007ff0e21c5805 in
> mozilla::dom::ContentChild::ProvideWindowCommon(mozilla::dom::TabChild*,
> mozIDOMWindowProxy*, bool, unsigned int, bool, bool, bool, nsIURI*,
> nsAString_internal const&, nsACString_internal const&, bool*,
> mozIDOMWindowProxy**) (this=0x7ff0d209d020, aTabOpener=0x7ff0c25a3c00,
> aParent=0x7ff0b3318020, aIframeMoz=false, aChromeFlags=4094,
> aCalledFromJS=true, aPositionSpecified=false, aSizeSpecified=false,
> aURI=0x7ff0b32ba000, aName=..., aFeatures=..., aWindowIsNew=0x7fff6b96b36d,
> aReturn=0x7fff6b96b4a0) at
> /home/allstars/src/gecko-dev/dom/ipc/ContentChild.cpp:845
> #54 0x00007ff0e220132a in
> mozilla::dom::TabChild::ProvideWindow(mozIDOMWindowProxy*, unsigned int,
> bool, bool, bool, nsIURI*, nsAString_internal const&, nsACString_internal
> const&, bool*, mozIDOMWindowProxy**) (this=0x7ff0c25a3c00,
> aParent=0x7ff0b3318020, aChromeFlags=4094, aCalledFromJS=true,
> aPositionSpecified=false, aSizeSpecified=false, aURI=0x7ff0b32ba000,
> aName=..., aFeatures=..., aWindowIsNew=0x7fff6b96b36d,
> aReturn=0x7fff6b96b4a0)
>     at /home/allstars/src/gecko-dev/dom/ipc/TabChild.cpp:1170
> #55 0x00007ff0e31ee8c7 in
> nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char
> const*, char const*, bool, bool, bool, nsIArray*, float*,
> mozIDOMWindowProxy**) (this=0x7ff0c25b31a0, aParent=0x7ff0b3318020,
> aUrl=0x7ff0b4704b48 "file_other_auxiliary_navigation_by_location.html",
> aName=0x7fff6b96b9b0 "otherWindow", aFeatures=0x0, aCalledFromJS=true,
> aDialog=false, aNavigate=true, aArgv=0x0, aOpenerFullZoom=0x0,
> aResult=0x7fff6b96b870)
>     at
> /home/allstars/src/gecko-dev/embedding/components/windowwatcher/
> nsWindowWatcher.cpp:900
> #56 0x00007ff0e31ed1a3 in nsWindowWatcher::OpenWindow2(mozIDOMWindowProxy*,
> char const*, char const*, char const*, bool, bool, bool, nsISupports*,
> float, unsigned char, mozIDOMWindowProxy**) (this=0x7ff0c25b31a0,
> aParent=0x7ff0b3318020, aUrl=0x7ff0b4704b48
> "file_other_auxiliary_navigation_by_location.html", aName=0x7fff6b96b9b0
> "otherWindow", aFeatures=0x0, aCalledFromScript=true, aDialog=false,
> aNavigate=true, aArguments=0x0, aOpenerFullZoom=1, aOptionalArgc=0 '\000',
> aResult=0x7fff6b96b870) at
> /home/allstars/src/gecko-dev/embedding/components/windowwatcher/
> nsWindowWatcher.cpp:461
> #57 0x00007ff0e036778a in nsGlobalWindow::OpenInternal(nsAString_internal
> const&, nsAString_internal const&, nsAString_internal const&, bool, bool,
> bool, bool, bool, nsIArray*, nsISupports*, nsPIDOMWindowOuter**)
> (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., aDialog=false,
> aContentModal=false, aCalledNoScript=false, aDoJSFixups=true,
> aNavigate=true, argv=0x0, aExtraArgument=0x0, aReturn=0x7fff6b96bae0)
>     at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:11816
> #58 0x00007ff0e03576e3 in nsGlobalWindow::OpenJS(nsAString_internal const&,
> nsAString_internal const&, nsAString_internal const&, nsPIDOMWindowOuter**)
> (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=...,
> _retval=0x7fff6b96bae0)
>     at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:8087
> Thread 1 "Web Content" hit Breakpoint 2, nsDocShell::SetOriginAttributes
> (this=0x7ff0b3b68800, aAttrs=...) at
> /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:14228
> (gdb) bt
> #0  0x00007ff0e31c22e8 in
> nsDocShell::SetOriginAttributes(mozilla::DocShellOriginAttributes const&)
> (this=0x7ff0b3b68800, aAttrs=...) at
> /home/allstars/src/gecko-dev/docshell/base/nsDocShell.cpp:14228
> #1  0x00007ff0e31ef805 in
> nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char
> const*, char const*, bool, bool, bool, nsIArray*, float*,
> mozIDOMWindowProxy**) (this=0x7ff0c25b31a0, aParent=0x7ff0b3318020,
> aUrl=0x7ff0b4704b48 "file_other_auxiliary_navigation_by_location.html",
> aName=0x7fff6b96b9b0 "otherWindow", aFeatures=0x0, aCalledFromJS=true,
> aDialog=false, aNavigate=true, aArgv=0x0, aOpenerFullZoom=0x0,
> aResult=0x7fff6b96b870)
>     at
> /home/allstars/src/gecko-dev/embedding/components/windowwatcher/
> nsWindowWatcher.cpp:1120
> #2  0x00007ff0e31ed1a3 in nsWindowWatcher::OpenWindow2(mozIDOMWindowProxy*,
> char const*, char const*, char const*, bool, bool, bool, nsISupports*,
> float, unsigned char, mozIDOMWindowProxy**) (this=0x7ff0c25b31a0,
> aParent=0x7ff0b3318020, aUrl=0x7ff0b4704b48
> "file_other_auxiliary_navigation_by_location.html", aName=0x7fff6b96b9b0
> "otherWindow", aFeatures=0x0, aCalledFromScript=true, aDialog=false,
> aNavigate=true, aArguments=0x0, aOpenerFullZoom=1, aOptionalArgc=0 '\000',
> aResult=0x7fff6b96b870) at
> /home/allstars/src/gecko-dev/embedding/components/windowwatcher/
> nsWindowWatcher.cpp:461
> #3  0x00007ff0e036778a in nsGlobalWindow::OpenInternal(nsAString_internal
> const&, nsAString_internal const&, nsAString_internal const&, bool, bool,
> bool, bool, bool, nsIArray*, nsISupports*, nsPIDOMWindowOuter**)
> (this=0x7ff0b3318000, aUrl=..., aName=..., aOptions=..., aDialog=false,
> aContentModal=false, aCalledNoScript=false, aDoJSFixups=true,
> aNavigate=true, argv=0x0, aExtraArgument=0x0, aReturn=0x7fff6b96bae0)
>     at /home/allstars/src/gecko-dev/dom/base/nsGlobalWindow.cpp:11816
Attached patch WIP - Patch.Splinter Review
Hi Baku
I'd like to request for some feedback from you first.

The problem I'd like to fix is that, when we call docShell.setOriginAttributes in nsWindowWatcher::OpenWindowInternal, the docshell has already loaded about:blank already, and from the stack trace, the nsIContentViewer is set when newChild->RecvLoadRemoteScript inside ContentChild::ProvideWindowCommon is called, so I have moved the docShell.setOriginAttributes before RecvLoadRemoteScript.

So far it seems okay in e10s, however in non-e10s mochitest I have a failure.
(browser/components/contextualidentity/test/browser/browser_windowOpen.js)
And the failure is mismatch origin attributes in nsDocShell::CreateAboutBlankContentViewer.

And the problem I saw that when running non-e10s, it's xpfe/appshell/nsContentTreeOwner.cpp that implements nsIWindowProvider, not TabChild.

Before I continue to check nsContentTreeOwner, I'd like to hear from your feedback first, since I don't understand window-related code here and you have fixed some bugs already.

Do you think my patch is in the right direction? Should I continue to work on nsContentTreeOwner? or you have different thoughts?

Thanks in advance.
Attachment #8784671 - Flags: feedback?(amarchesini)
Comment on attachment 8784671 [details] [diff] [review]
WIP - Patch.

Review of attachment 8784671 [details] [diff] [review]:
-----------------------------------------------------------------

In e10s, everything seems ok, but what about non-e10s? Removing the code from nsWindowWatcher, means that we don't sent the OriginAttributes in non-e10s mode.
The direction seems correct, but you have to fix the non-e10s mode as well.

Sorry sorry and sorry for the super delay.

::: docshell/base/nsDocShell.cpp
@@ +14228,2 @@
>    MOZ_ASSERT(mChildList.IsEmpty());
> +  if (!mChildList.IsEmpty() || mContentViewer) {

I like this change. Maybe having the assertion plus this check is a bit misleading...
Attachment #8784671 - Flags: feedback?(amarchesini) → feedback+
Assignee: allstars.chh → amarchesini
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: