Closed Bug 1147193 Opened 5 years ago Closed 5 years ago

Getting Assertion failure on promise?

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: marcosc, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

Attached file out.txt
Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))), at /Users/marcos/gecko/dom/base/DOMException.cpp:585
#01: mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) (BindingUtils.cpp:2494, in XUL)
#02: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:236, in XUL)
#03: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value const*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:558, in XUL)
#04: MaybeCallMethod(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsobj.cpp:3464, in XUL)
#05: JS::OrdinaryToPrimitive(JSContext*, JS::Handle<JSObject*>, JSType, JS::MutableHandle<JS::Value>) (jsobj.cpp:3487, in XUL)
#06: js::ToPrimitive(JSContext*, JS::Handle<JSObject*>, JSType, JS::MutableHandle<JS::Value>) (jsobj.cpp:3340, in XUL)
#07: JSString* js::ToStringSlow<(js::AllowGC)1>(js::ExclusiveContext*, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType) (jsobjinlines.h:544, in XUL)
#08: js::ErrorReport::init(JSContext*, JS::Handle<JS::Value>) (RootingAPI.h:783, in XUL)
#09: mozilla::dom::Promise::MaybeReportRejected() (Promise.cpp:1098, in XUL)
#10: mozilla::dom::Promise::cycleCollection::Unlink(void*) (Promise.h:252, in XUL)
#11: nsCycleCollector::CollectWhite() (nsCycleCollector.cpp:3282, in XUL)
#12: nsCycleCollector::Collect(ccType, js::SliceBudget&, nsICycleCollectorListener*, bool) (nsCycleCollector.cpp:3611, in XUL)
#13: nsCycleCollector_collect(nsICycleCollectorListener*) (GeckoProfilerImpl.h:368, in XUL)
#14: nsJSContext::CycleCollectNow(nsICycleCollectorListener*, int) (nsJSEnvironment.cpp:1515, in XUL)
#15: nsJSEnvironmentObserver::Observe(nsISupports*, char const*, char16_t const*) (nsJSEnvironment.cpp:259, in XUL)
#16: nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) (nsTArray.h:331, in XUL)
#17: nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) (nsTHashtable.h:129, in XUL)
#18: mozilla::dom::ContentChild::RecvFlushMemory(nsString const&) (nsCOMPtr.h:389, in XUL)
#19: mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) (.PContentChild.cpp:5573, in XUL)
#20: mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) (MessageChannel.h:507, in XUL)
#21: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message const&) (Maybe.h:155, in XUL)
#22: mozilla::ipc::MessageChannel::OnMaybeDequeueOne() (MessageChannel.cpp:237, in XUL)
#23: MessageLoop::RunTask(Task*) (message_loop.cc:362, in XUL)
#24: MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) (message_loop.cc:369, in XUL)
#25: MessageLoop::DoWork() (message_loop.cc:456, in XUL)
#26: mozilla::ipc::DoWorkRunnable::Run() (MessagePump.cpp:234, in XUL)
#27: nsThread::ProcessNextEvent(bool, bool*) (nsCOMPtr.h:389, in XUL)
#28: NS_ProcessPendingEvents(nsIThread*, unsigned int) (nsThreadUtils.cpp:207, in XUL)
#29: nsBaseAppShell::NativeEventCallback() (nsBaseAppShell.cpp:99, in XUL)
#30: nsAppShell::ProcessGeckoEvents(void*) (nsAppShell.mm:378, in XUL)
#31: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation) + 17
#32: __CFRunLoopDoSources0 (in CoreFoundation) + 269
#33: __CFRunLoopRun (in CoreFoundation) + 927
#34: CFRunLoopRunSpecific (in CoreFoundation) + 296
#35: RunCurrentEventLoopInMode (in HIToolbox) + 235
#36: ReceiveNextEventCommon (in HIToolbox) + 431
#37: _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox) + 71
#38: _DPSNextEvent (in AppKit) + 964
#39: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit) + 194
#40: -[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (nsAppShell.mm:118, in XUL)
#41: -[NSApplication run] (in AppKit) + 594
#42: nsAppShell::Run() (nsCOMPtr.h:512, in XUL)
#43: XRE_RunAppShell (nsEmbedFunctions.cpp:743, in XUL)
#44: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (MessagePump.cpp:272, in XUL)
#45: MessageLoop::Run() (message_loop.cc:517, in XUL)
#46: XRE_InitChildProcess (nsAutoPtr.h:166, in XUL)
#47: content_process_main(int, char**) (plugin-container.cpp:211, in plugin-container)
Apply this, then run: 

./mach mochitest-browser --e10s dom/manifest/test/browser_ManifestObtainer_obtain.js
OK, so we have a promise rejected with an Exception (not DOMException), NS_ERROR_ILLEGAL_VALUE, "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMessageSender.sendAsyncMessage]".

The corresponding mLocation has a null mStack, because it's been unlinked.  No particular surprise there given that we're doing the promise reporting off unlink.

We used to silently return an empty string here until bug 1122238.  Now we throw and the caller asserts that we don't.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8583143 [details] [diff] [review]
Go back to having our accessors on JSStackFrame infallible

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

It's too bad this didn't work out, but I also like infallible accessors. :-)
Attachment #8583143 - Flags: review?(bobbyholley) → review+
Blocks: 1083410
https://hg.mozilla.org/mozilla-central/rev/92aeec7102fe
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Blocks: 1162729
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.