ASSERTION: XPConnect is being called on a scope without a 'Components' property! while running test_localStorageQuota.html

RESOLVED WORKSFORME

Status

()

Core
XPConnect
RESOLVED WORKSFORME
7 years ago
5 years ago

People

(Reporter: mayhemer, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
STR:
Run http://mochi.test:8888/tests/dom/tests/mochitest/localstorage/test_localStorageQuota.html

It happens at:
http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/localstorage/test_localStorageQuota.html?force=1#72

Stack trace c++:

###!!! ASSERTION: XPConnect is being called on a scope without a 'Components' property!: 'Error', file /Users/starapica/Documents/mozilla/mozilla-central/src/js/src/xpconnect/src/xpcwrappednativescope.cpp, line 786
DEBUG_CheckForComponentsInScope(JSContext*, JSObject*, int, XPCJSRuntime*)+0x000000BF [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00EE946E]
XPCWrappedNativeScope::FindInJSObjectScope(JSContext*, JSObject*, int, XPCJSRuntime*)+0x0000016C [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00EE988E]
XPCConvert::NativeInterface2JSObject(XPCLazyCallContext&, jsval_layout*, nsIXPConnectJSObjectHolder**, xpcObjectHelper&, nsID const*, XPCNativeInterface**, JSObject*, int, int, unsigned int*)+0x0000010D [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00EA4FBB]
NativeInterface2JSObject(XPCLazyCallContext&, JSObject*, nsISupports*, nsWrapperCache*, nsID const*, int, jsval_layout*, nsIXPConnectJSObjectHolder**)+0x00000072 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00E82C4E]
nsXPConnect::WrapNativeToJSVal(JSContext*, JSObject*, nsISupports*, nsWrapperCache*, nsID const*, int, jsval_layout*, nsIXPConnectJSObjectHolder**)+0x000001BF [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00E82E9F]
nsContentUtils::WrapNative(JSContext*, JSObject*, nsISupports*, nsWrapperCache*, nsID const*, jsval_layout*, nsIXPConnectJSObjectHolder**, int)+0x000001E8 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x005F055C]
nsContentUtils::WrapNative(JSContext*, JSObject*, nsISupports*, nsID const*, jsval_layout*, nsIXPConnectJSObjectHolder**, int)+0x00000043 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x009E9AC7]
nsDOMClassInfo::WrapNative(JSContext*, JSObject*, nsISupports*, nsID const*, int, jsval_layout*, nsIXPConnectJSObjectHolder**)+0x0000003B [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x009E9B04]
nsWindowSH::SetProperty(nsIXPConnectWrappedNative*, JSContext*, JSObject*, jsid, jsval_layout*, int*)+0x000003C7 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x009CD8D1]
xpc::holder_set(JSContext*, JSObject*, jsid, jsval_layout*)+0x00000171 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FB1FAB]
js::CallJSPropertyOpSetter(JSContext*, int (*)(JSContext*, JSObject*, jsid, js::Value*), JSObject*, jsid, js::Value*)+0x0000004F [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0199C743]
js::CallSetter(JSContext*, JSObject*, jsid, int (*)(JSContext*, JSObject*, jsid, js::Value*), unsigned int, unsigned int, js::Value*)+0x000000C7 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0199C814]
js::JSProxyHandler::set(JSContext*, JSObject*, JSObject*, jsid, js::Value*)+0x00000218 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0199B158]
xpc::XrayWrapper<JSCrossCompartmentWrapper, xpc::CrossCompartmentXray>::set(JSContext*, JSObject*, JSObject*, jsid, js::Value*)+0x00000034 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FB048C]
js::JSProxy::set(JSContext*, JSObject*, JSObject*, jsid, js::Value*)+0x0000005C [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01995E40]
js::proxy_SetProperty(JSContext*, JSObject*, jsid, js::Value*, int)+0x0000002D [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01995E83]
JSObject::setProperty(JSContext*, jsid, js::Value*, int)+0x0000005C [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0188176E]
js::Interpret(JSContext*, JSStackFrame*, unsigned int, JSInterpMode)+0x00014848 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0191CD5D]
js::RunScript(JSContext*, JSScript*, JSStackFrame*)+0x00000111 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0193213D]
SendToGenerator(JSContext*, JSGeneratorOp, JSObject*, JSGenerator*, js::Value const&)+0x00000331 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0193A0DA]
generator_op(JSContext*, JSGeneratorOp, js::Value*, unsigned int)+0x0000028D [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0193A523]
generator_next(JSContext*, unsigned int, js::Value*)+0x00000027 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0193A5DE]
UNKNOWN 0x12a0f905
js::mjit::EnterMethodJIT(JSContext*, JSStackFrame*, void*, js::Value*)+0x000000DF [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01A95D69]
CheckStackAndEnterMethodJIT(JSContext*, JSStackFrame*, void*)+0x00000080 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01A95E80]
js::mjit::JaegerShot(JSContext*)+0x000000C2 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01A95FA8]
js::RunScript(JSContext*, JSScript*, JSStackFrame*)+0x000000E2 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0193210E]
js::Invoke(JSContext*, js::CallArgs const&, unsigned int)+0x0000050D [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01932EF7]
js::ExternalInvoke(JSContext*, js::Value const&, js::Value const&, unsigned int, js::Value*, js::Value*)+0x000000CF [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x019335EC]
js::ExternalInvoke(JSContext*, JSObject*, js::Value const&, unsigned int, js::Value*, js::Value*)+0x0000004B [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01868338]
JS_CallFunctionValue+0x00000153 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01868490]
nsJSContext::CallEventHandler(nsISupports*, void*, void*, nsIArray*, nsIVariant**)+0x00000478 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00965EF2]
nsJSEventListener::HandleEvent(nsIDOMEvent*)+0x00000CF1 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x009F4DF5]
nsEventListenerManager::HandleEventSubType(nsListenerStruct*, nsIDOMEventListener*, nsIDOMEvent*, nsPIDOMEventTarget*, unsigned int, nsCxPusher*)+0x000003CB [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00744CEF]
nsEventListenerManager::HandleEventInternal(nsPresContext*, nsEvent*, nsIDOMEvent**, nsPIDOMEventTarget*, unsigned int, nsEventStatus*, nsCxPusher*)+0x000003D5 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x007450D3]
nsEventListenerManager::HandleEvent(nsPresContext*, nsEvent*, nsIDOMEvent**, nsPIDOMEventTarget*, unsigned int, nsEventStatus*, nsCxPusher*)+0x00000126 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00776700]
nsEventTargetChainItem::HandleEvent(nsEventChainPostVisitor&, unsigned int, int, nsCxPusher*)+0x000001BB [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x007768C3]
nsEventTargetChainItem::HandleEventTargetChain(nsEventChainPostVisitor&, unsigned int, nsDispatchingCallback*, int, nsCxPusher*)+0x0000020A [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00774D28]
nsEventDispatcher::Dispatch(nsISupports*, nsPresContext*, nsEvent*, nsIDOMEvent*, nsEventStatus*, nsDispatchingCallback*, nsCOMArray<nsPIDOMEventTarget>*)+0x00000A01 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x007759FF]
nsGlobalWindow::PostHandleEvent(nsEventChainPostVisitor&)+0x000002F5 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x009976D9]
nsEventTargetChainItem::PostHandleEvent(nsEventChainPostVisitor&)+0x0000004C [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00774B16]
nsEventTargetChainItem::HandleEventTargetChain(nsEventChainPostVisitor&, unsigned int, nsDispatchingCallback*, int, nsCxPusher*)+0x00000228 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00774D46]
nsEventTargetChainItem::HandleEventTargetChain(nsEventChainPostVisitor&, unsigned int, nsDispatchingCallback*, int, nsCxPusher*)+0x0000040F [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00774F2D]
nsEventDispatcher::Dispatch(nsISupports*, nsPresContext*, nsEvent*, nsIDOMEvent*, nsEventStatus*, nsDispatchingCallback*, nsCOMArray<nsPIDOMEventTarget>*)+0x00000A01 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x007759FF]
DocumentViewerImpl::LoadComplete(unsigned int)+0x00000292 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00311606]
nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, unsigned int)+0x000001E7 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FD0273]
nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, unsigned int)+0x0000072D [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FD728B]
nsDocLoader::FireOnStateChange(nsIWebProgress*, nsIRequest*, int, unsigned int)+0x00000260 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FFB798]
nsDocLoader::doStopDocumentLoad(nsIRequest*, unsigned int)+0x000000B0 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FFBF62]
nsDocLoader::DocLoaderIsEmpty(int)+0x0000037C [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FFC332]
nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, unsigned int)+0x000004E4 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00FFD61C]
nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, unsigned int)+0x0000033E [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0007CFE6]
nsDocument::DoUnblockOnload()+0x00000161 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x006481A5]
nsDocument::UnblockOnload(int)+0x0000011E [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x006482D6]
nsDocument::DispatchContentLoadedEvents()+0x000004C3 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x00635A35]
nsRunnableMethodImpl<void (nsDocument::*)(), true>::Run()+0x00000065 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x0064E8CD]
nsThread::ProcessNextEvent(int, int*)+0x000002A4 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x016833EA]
NS_ProcessPendingEvents_P(nsIThread*, unsigned int)+0x00000092 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01609893]
nsBaseAppShell::NativeEventCallback()+0x000000B5 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x013B33F1]
nsAppShell::ProcessGeckoEvents(void*)+0x000001F1 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01364299]
__CFRunLoopDoSources0+0x0000061B [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x0003F0FB]
__CFRunLoopRun+0x0000042F [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x0003CBBF]
CFRunLoopRunSpecific+0x000001C4 [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x0003C094]
CFRunLoopRunInMode+0x00000061 [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x0003BEC1]
RunCurrentEventLoopInMode+0x00000188 [/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x00034F9C]
ReceiveNextEventCommon+0x0000009E [/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x00034C8D]
BlockUntilNextEventMatchingListInMode+0x00000051 [/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x00034BD6]
_DPSNextEvent+0x0000034F [/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x00048A89]
-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]+0x0000009C [/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x000482CA]
-[NSApplication run]+0x00000335 [/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x0000A55B]
nsAppShell::Run()+0x00000123 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x01362F97]
nsAppStartup::Run()+0x00000094 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x010ABEEC]
XRE_main+0x00002E32 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/bin/XUL +0x000338E7]
main+0x000002CA [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/MinefieldDebug.app/Contents/MacOS/firefox-bin +0x000015DD]
start+0x00000036 [/Users/starapica/Documents/mozilla/mozilla-central/src/_obj-browser-debug/dist/MinefieldDebug.app/Contents/MacOS/firefox-bin +0x0000125E]


JS Stack:

0 doNextTest() ["http://mochi.test:8888/tests/dom/tests/mochitest/localstorage/test_localStorageQuota.html":72]
    this = [object Window @ 0x4becd30 (native @ 0x4d45988)]
1 onMessageReceived(event = [object MessageEvent @ 0x494eb10 (native @ 0x6790de0)]) ["http://mochi.test:8888/tests/dom/t
ests/mochitest/localstorage/interOriginTest.js":34]
    this = [object Window @ 0x4becd30 (native @ 0x4d45988)]
(Reporter)

Comment 1

7 years ago
And to note:

- on line 72 of the test I do 'slave.location = slaveOrigin + slavePath + "frameQuota.html?add&B&success";' - assigning to an URL to iframe's location
- 'slave' is a global var defined in included script interOriginTest.js
- at the top of the 'doNextStep' function it is assigned like this:
  slave = frame;
- 'frame' is a named iframe, defined at the bottom of the main test html:
  <iframe src="" name="frame"></iframe>
- when I change the code to:
  slave = document.getElementById("_the_test_frame").contentWindow;
  and 
  <iframe src="" id="_the_test_frame"></iframe>

  there is no longer the assertion failure

'frame' might be masking something on the window object.
(Reporter)

Comment 2

7 years ago
Question is:
- do we first have to fix the assertion failure (i.e. is this an xpconnect bug?), or
- is just the test wrong and is what's needed to fix?

Comment 3

5 years ago
Bug 747434 removed the assertion.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.