gecko-dev/layout/base
L. David Baron 608d04db2f Bug 1270626 - Don't leave an unhandled ErrorResult and assert when media query listeners throw exceptions. r=bzbarsky
I'm acting under the assumption that this is what's closest to what the
code does now, except without asserting in ~ErrorResult.  It also seems
closest to what event listeners will do, both based on examining code
(EventListenerManager::HandleEventSubType, which I'm hoping is the right
code to look at, calls StealNSResult, and then stores it in a member
that's ignored by most callers) and based on testing (for both click
events, and for media query listeners with this patch, the exception
gets reported to the console as an unhandled exception).  That said, I'm
not particularly well versed in the current error handling rules so I
may well be off here.

This code should presumably go away when we change this code to use
EventListeners in bug 1265622, so I don't think there's any spec that
covers this.

Without the patch, the mochitest hits the fatal assertion (after
reporting hitting the expected uncaught exception).  With the
patch the test passes.  (Tested locally.)

MozReview-Commit-ID: 5kxp6jzGzX8

--HG--
extra : transplant_source : n%B4%AE%99D%FB%B9NM%C0%A2%F0%D4%B7%8C%E7%DE4E%60
2016-05-05 21:33:47 -07:00
..
crashtests Bug 1258017 - Cleanup fixes for trunk. r=me 2016-04-21 13:56:40 -07:00
doc Bug 1246477 - Fix carets not updated by scroll events in LongTapState. r=roc 2016-02-08 16:08:45 +08:00
gtest Bug 1249201 Part 2 - Show carets continuously when panning or zooming. r=mats,sebastian 2016-04-21 16:53:40 +08:00
tests Bug 842853 - Follow-up to fix a test typo. r=me 2016-05-01 00:38:32 +02:00
AccessibleCaret.cpp Bug 1248309 - Fix caret size not updated when only zoom level is changed. r=roc 2016-02-15 18:29:32 +08:00
AccessibleCaret.h Bug 1246918 - Handle PresShell gone after FlushLayout(). r=roc 2016-02-15 15:12:35 +08:00
AccessibleCaretEventHub.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
AccessibleCaretEventHub.h Bug 1225701 - Update comments in AccessibleCaret files. r=mtseng 2015-11-18 11:44:00 +08:00
AccessibleCaretLogger.h Bug 1219470 - Replace PRLogModuleInfo with LazyLogModule. r=roc 2015-11-05 23:35:03 +01:00
AccessibleCaretManager.cpp Bug 1266782 - Use RefPtr to hold document and selection in ExtendPhoneNumberSelection. r=mats 2016-04-28 13:59:39 +08:00
AccessibleCaretManager.h Bug 1249201 Part 2 - Show carets continuously when panning or zooming. r=mats,sebastian 2016-04-21 16:53:40 +08:00
ActiveLayerTracker.cpp Bug 550426 - Use background-position-x/y in ActiveLayerTracker. r=dbaron 2016-04-20 23:34:46 -04:00
ActiveLayerTracker.h Bug 550426 - Use background-position-x/y in ActiveLayerTracker. r=dbaron 2016-04-20 23:34:46 -04:00
ArenaObjectID.h Bug 1203766 - Part 1: Generate nsPresArena::ObjectIDs with a preprocessor-included file. r=bzbarsky 2015-09-17 12:08:19 +10:00
ArenaRefPtr.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ArenaRefPtrInlines.h Bug 1203766 - Part 2: Add an ArenaRefPtr class that can have its pointer cleared out when an object's owning nsPresArena goes away. r=bzbarsky 2015-09-17 12:08:19 +10:00
BorderConsts.h Bug 382721 - Part 2: Split constants for border rendering to BorderConsts.h. r=jrmuizel 2015-08-06 11:42:09 +09:00
CaretAssociationHint.h
DisplayItemClip.cpp Bug 1259734 - use AppendElements in DisplayItemClip::AppendRoundedRects; r=dholbert 2016-03-25 09:34:37 -04:00
DisplayItemClip.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
DisplayItemScrollClip.cpp Bug 1238564 - Get rid of cross stacking context parent scroll clip. r=mattwoodrow 2016-03-04 14:49:35 -05:00
DisplayItemScrollClip.h Bug 1238564 - Get rid of cross stacking context parent scroll clip. r=mattwoodrow 2016-03-04 14:49:35 -05:00
DisplayListClipState.cpp Bug 1238564 - Get rid of cross stacking context parent scroll clip. r=mattwoodrow 2016-03-04 14:49:35 -05:00
DisplayListClipState.h Bug 1238564 - Get rid of cross stacking context parent scroll clip. r=mattwoodrow 2016-03-04 14:49:35 -05:00
FrameLayerBuilder.cpp Bug 1266380 - Don't try to untransform visible regions for inactive perspective layers. r=thinker 2016-04-28 17:05:46 +12:00
FrameLayerBuilder.h Bug 1221094 - Detect scrollability (for using tiled layers) through container layers. r=mattwoodrow 2016-03-08 14:43:32 -05:00
FramePropertyTable.cpp Bug 1246846 (part 4) - Avoid nsTHashtable::RawRemoveEntry() in FramePropertyTable. r=roc. 2016-02-09 13:56:07 +11:00
FramePropertyTable.h Bug 1258594 (Followup) - Rename FrameProperties::IsSet() to FrameProperties::Has(). r=dbaron 2016-03-25 14:49:42 -07:00
GeometryUtils.cpp Bug 1250143. Account for border/padding on outer <svg> elements in GeometryUtils. r=mats 2016-02-25 23:54:09 +13:00
GeometryUtils.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
LayerState.h
LayoutLogging.cpp Bug 1219470 - Replace PRLogModuleInfo with LazyLogModule. r=roc 2015-11-05 23:35:03 +01:00
LayoutLogging.h Bug 1219470 - Replace PRLogModuleInfo with LazyLogModule. r=roc 2015-11-05 23:35:03 +01:00
MaskLayerImageCache.cpp
MaskLayerImageCache.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
MobileViewportManager.cpp Bug 1259733 - use forward declarations for nsIDocument in a few places; r=dholbert 2016-04-27 14:48:36 -04:00
MobileViewportManager.h Bug 1259733 - use forward declarations for nsIDocument in a few places; r=dholbert 2016-04-27 14:48:36 -04:00
moz.build Bug 1268390 - Part 1: Factor out most of nsStyleSet::AddDocStyleSheet for re-use. r=bholley 2016-04-29 14:01:44 +10:00
nsArenaMemoryStats.h
nsAutoLayoutPhase.cpp
nsAutoLayoutPhase.h
nsBidi.cpp Bug 1248551 - Add assertion to confirm that the bidi code is not trying to execute an invalid state-machine action. r=roc 2016-02-17 21:41:43 +00:00
nsBidi.h Bug 1230034 part 6 - Convert all frame properties which do not hold pointer to be typed. r=dbaron 2016-01-28 14:23:59 +11:00
nsBidiPresUtils.cpp Bug 1266324 - Rename style const macro for unicode-bidi:bidi-override to be consistent with other style consts. r=jfkthame 2016-04-22 10:37:21 +10:00
nsBidiPresUtils.h Bug 1232852 (part 3) - Remove unused parameters from some accessibility code. r=tbsaunde. 2015-12-15 21:24:06 -08:00
nsCaret.cpp Bug 1257121 part 4 - Use return value rather than out param to return font metrics. r=jfkthame 2016-03-17 13:55:48 +08:00
nsCaret.h Bug 1232852 (part 4) - Remove some unused parameters in and around layout/base/. r=heycam. 2016-01-05 16:08:17 -08:00
nsChangeHint.h Bug 1227327 - Invalidate table parts and MathML frames when background-position changes on them. r=dbaron 2016-04-28 13:01:22 -04:00
nsCompatibility.h
nsCounterManager.cpp Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
nsCounterManager.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsCSSColorUtils.cpp
nsCSSColorUtils.h
nsCSSFrameConstructor.cpp Bug 1268404 - Part 1: Split out ResolveStyleForText from ResolveStyleForNonElement and pass in the text node. r=bholley 2016-04-29 14:01:44 +10:00
nsCSSFrameConstructor.h Bug 1259733 - use forward declarations for nsIDocument in a few places; r=dholbert 2016-04-27 14:48:36 -04:00
nsCSSRendering.cpp Bug 735857 - Treat background-attachment:fixed as background-attachment:scroll if it's on a non-root element affected by a transform. r=mstange 2016-04-25 17:20:13 -04:00
nsCSSRendering.h Bug 735857 - Treat background-attachment:fixed as background-attachment:scroll if it's on a non-root element affected by a transform. r=mstange 2016-04-25 17:20:13 -04:00
nsCSSRenderingBorders.cpp Bug 382721 - Part 2: Split constants for border rendering to BorderConsts.h. r=jrmuizel 2015-08-06 11:42:09 +09:00
nsCSSRenderingBorders.h Bug 382721 - Part 2: Split constants for border rendering to BorderConsts.h. r=jrmuizel 2015-08-06 11:42:09 +09:00
nsDisplayItemTypes.h
nsDisplayItemTypesList.h Bug 1248913 - Rename nsDisplayMixBlendMode to nsDisplayBlendMode. r=mattwoodrow 2016-03-05 17:04:02 -05:00
nsDisplayList.cpp Bug 1263116 - Stop throwing for DOMTokenList's.contains() when using empty string or ASCII whitespace, r=baku 2016-05-05 18:07:22 +08:00
nsDisplayList.h Bug 1227327 - Allow specifying a background rect for background dislay items. r=mattwoodrow 2016-05-04 14:14:23 -04:00
nsDisplayListInvalidation.cpp Bug 852754 - Part 1: Share the code for limiting scale factors to all image types. r=mstange 2016-04-07 18:52:35 +12:00
nsDisplayListInvalidation.h Bug 852754 - Part 1: Share the code for limiting scale factors to all image types. r=mstange 2016-04-07 18:52:35 +12:00
nsDocumentViewer.cpp Bug 1269539 - Ensure that the scroll position is restored properly on reloading a page which loads incrementally. r=tnikkel 2016-05-03 10:40:20 -04:00
nsFrameManager.cpp Bug 1263785 - Kill off the deprecated nsINode::GetCurrentDoc. r=baku 2016-03-31 12:46:32 +01:00
nsFrameManager.h Bug 1223228 - Remove unused nsFrameManagerBase::mStyleSet. r=dholbert 2015-11-10 12:27:47 +11:00
nsFrameManagerBase.h Bug 1244068 - Part 4: Use StyleSetHandle instead of concrete style set class in most places. r=dholbert 2016-02-24 18:01:11 +11:00
nsFrameTraversal.cpp Bug 1227927 Part 2 - Remove nsIFrame::GetFirstPrincipalChild(). r=mats 2016-01-29 22:42:14 +08:00
nsFrameTraversal.h
nsGenConList.cpp
nsGenConList.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsIDocumentViewerPrint.h Bug 1245978 part 3: Drop unnecessary whitespace in NS_DECL_NSIDOCUMENTVIEWERPRINT macro. (whitespace only, no review) 2016-02-29 15:09:13 -08:00
nsIFrameTraversal.h
nsILayoutDebugger.h Bug 1232852 (part 2) - Remove some dead member functions from nsILayoutDebugger. r=roc. 2016-01-05 00:21:57 -08:00
nsILayoutHistoryState.h Bug 1155730, implement History.scrollRestoration r=jst 2015-12-26 12:59:09 +02:00
nsIPercentBSizeObserver.h
nsIPresShell.h Bug 1267568 part 4 - Replace InFullscreenChange flag of PresShell with IsResizeSuppressed flag in RefreshDriver. r=smaug 2016-05-03 17:58:57 +10:00
nsIReflowCallback.h
nsIStyleSheetService.idl
nsLayoutDebugger.cpp Bug 1239864 (part 9) - Use the new rect iterators in layout/ and ipc/. r=dholbert. 2016-01-18 17:20:59 -08:00
nsLayoutHistoryState.cpp Bug 1155730, implement History.scrollRestoration r=jst 2015-12-26 12:59:09 +02:00
nsLayoutUtils.cpp Bug 1030952 part 3: Add a frame property to allow flex container to impose a different main-size on a flex item for aspect ratio calculations. r=mats 2016-04-28 20:17:02 -07:00
nsLayoutUtils.h Bug 1267209 - Convert nsLayoutUtils::PaintFrame flags to be an enum class. r=jfkthame 2016-04-27 12:01:54 +08:00
nsPresArena.cpp Bug 1203766 - Part 3: Add ArenaRefPtr support to nsStyleContext. r=bzbarsky 2015-09-17 12:08:20 +10:00
nsPresArena.h Bug 1203766 - Part 3: Add ArenaRefPtr support to nsStyleContext. r=bzbarsky 2015-09-17 12:08:20 +10:00
nsPresArenaObjectList.h Bug 1203766 - Part 3: Add ArenaRefPtr support to nsStyleContext. r=bzbarsky 2015-09-17 12:08:20 +10:00
nsPresContext.cpp Bug 1270626 - Don't leave an unhandled ErrorResult and assert when media query listeners throw exceptions. r=bzbarsky 2016-05-05 21:33:47 -07:00
nsPresContext.h Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
nsPresShell.cpp Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
nsPresShell.h Bug 1259246. Move nsIPresShell::GetRealPrimaryFrameFor to nsLayoutUtils::GetRealPrimaryFrameFor. r=dholbert 2016-04-23 15:18:26 -05:00
nsPresState.h Bug 1269539 - Ensure that the scroll position is restored properly on reloading a page which loads incrementally. r=tnikkel 2016-05-03 10:40:20 -04:00
nsQuoteList.cpp Bug 1261754 - Part 3: Move quotes from nsStyleQuotes to nsStyleList and delete nsStyleQuotes. r=dholbert 2016-04-12 15:52:40 +10:00
nsQuoteList.h
nsRefreshDriver.cpp Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
nsRefreshDriver.h Bug 1267568 part 4 - Replace InFullscreenChange flag of PresShell with IsResizeSuppressed flag in RefreshDriver. r=smaug 2016-05-03 17:58:57 +10:00
nsStyleChangeList.cpp
nsStyleChangeList.h
nsStyleSheetService.cpp Bug 1250379 - Create css::Loaders for specific style backend types. r=dholbert 2016-02-24 18:01:12 +11:00
nsStyleSheetService.h Bug 1244074 - Part 4: Use StyleSheetHandle instead of concrete style sheet class in most places. r=dholbert 2016-02-24 18:01:12 +11:00
PaintTracker.cpp
PaintTracker.h
PositionedEventTargeting.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
PositionedEventTargeting.h
RestyleLogging.h
RestyleManager.cpp Bug 1227327 - Invalidate table parts and MathML frames when background-position changes on them. r=dbaron 2016-04-28 13:01:22 -04:00
RestyleManager.h Bug 1182856 - Part 2: Let AnimationsWithDestroyFrame destroy transitions. r=heycam 2016-04-10 21:28:00 +02:00
RestyleManagerHandle.h Bug 1248864 - Part 2: Add skeleton ServoRestyleManager and a RestyleManagerHandle smart pointer. r=dholbert 2016-02-24 18:01:12 +11:00
RestyleManagerHandleInlines.h Bug 1248864 - Part 2: Add skeleton ServoRestyleManager and a RestyleManagerHandle smart pointer. r=dholbert 2016-02-24 18:01:12 +11:00
RestyleTracker.cpp Bug 1263787 - Kill off the deprecated nsINode::GetCrossShadowCurrentDoc. r=baku 2016-03-31 13:20:14 +01:00
RestyleTracker.h Bug 1251770 - Remove remaining references to MOZILLA_XPCOMRT_API from layout. r=dbaron 2016-02-27 11:12:08 -08:00
RestyleTrackerInlines.h
ScrollbarStyles.cpp
ScrollbarStyles.h
ServoRestyleManager.cpp Bug 1248864 - Part 2: Add skeleton ServoRestyleManager and a RestyleManagerHandle smart pointer. r=dholbert 2016-02-24 18:01:12 +11:00
ServoRestyleManager.h Bug 1248864 - Part 2: Add skeleton ServoRestyleManager and a RestyleManagerHandle smart pointer. r=dholbert 2016-02-24 18:01:12 +11:00
StackArena.cpp
StackArena.h Bug 1263773 - Mark a bunch of classes in layout as MOZ_RAII. r=dholbert 2016-03-28 13:34:26 +01:00
StaticPresData.cpp Bug 1261552 - Introduce StaticPresData and hoist some shared functionality into it. r=heycam 2016-04-04 23:14:27 -07:00
StaticPresData.h Bug 1261552 - Introduce StaticPresData and hoist some shared functionality into it. r=heycam 2016-04-04 23:14:27 -07:00
TouchManager.cpp Bug 1259657 Rename WidgetGUIEvent::widget to WidgetGUIEvent::mWidget r=smaug 2016-04-14 17:03:14 +09:00
TouchManager.h Bug 382721 - Part 0: Add missing includes and namespaces. r=jrmuizel 2015-09-10 19:24:34 +09:00
Units.h Bug 1219296 - Scroll snap directly in APZ instead of going through the main thread. r=kats 2016-03-28 18:36:02 -04:00
UnitTransforms.h Handle device resets by recreating the compositor, rather than the compositor IPDL stack. (bug 1245765 part 7, r=mattwoodrow) 2016-02-29 01:53:15 -05:00
WordMovementType.h
ZoomConstraintsClient.cpp Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
ZoomConstraintsClient.h Bug 1259733 - use forward declarations for nsIDocument in a few places; r=dholbert 2016-04-27 14:48:36 -04:00