diff --git a/editor/libeditor/nsHTMLEditor.cpp b/editor/libeditor/nsHTMLEditor.cpp
index 75eebb4b8..a23607196 100644
--- a/editor/libeditor/nsHTMLEditor.cpp
+++ b/editor/libeditor/nsHTMLEditor.cpp
@@ -154,6 +154,8 @@ nsHTMLEditor::~nsHTMLEditor()
}
RemoveEventListeners();
+
+ HideAnonymousEditingUIs();
}
void
diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp
index d5eb37176..05c69b63b 100644
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -2764,7 +2764,10 @@ Http2Session::WriteSegmentsAgain(nsAHttpSegmentWriter *writer,
LOG3(("Http2Session::WriteSegments %p trying to discard %d bytes of data",
this, count));
- if (!count) {
+ if (!count && mDownstreamState == DISCARDING_DATA_FRAME) {
+ // Only do this short-cirtuit if we're not discarding a pure padding
+ // frame, as we need to potentially handle the stream FIN in those cases.
+ // See bug 1381016 comment 36 for more details.
ResetDownstreamState();
ResumeRecv();
return NS_BASE_STREAM_WOULD_BLOCK;