Trying to nail down The offset is out of bounds: '!mParent || mOffset.value() <= mParent->Length()' draft
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Sat, 09 Nov 2019 11:00:14 +0900
changeset 81073 552fdab452104a392f8bfe515ca4f2289065bb56
parent 81072 5a4d04240bdaa767d3637490270a58a9f1d1db9d
child 81074 cc69a65dd1ca556d706487d20b4ec945d9696f8e
push id9744
push userishikawa@yk.rim.or.jp
push dateSat, 09 Nov 2019 02:01:06 +0000
treeherdertry-comm-central@56c83244ac0e [default view] [failures only]
Trying to nail down The offset is out of bounds: '!mParent || mOffset.value() <= mParent->Length()'
mozilla-M-C-011-editorDom-assert.patch
new file mode 100644
--- /dev/null
+++ b/mozilla-M-C-011-editorDom-assert.patch
@@ -0,0 +1,28 @@
+# HG changeset patch
+# User ISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
+# Parent  c72488e81fa11b1dc6e0664f829cf2ced0dff6d3
+Trying to nail down The offset is out of bounds: '\!mParent || mOffset.value() <= mParent->Length()'
+
+diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint.h
+--- a/editor/libeditor/EditorDOMPoint.h
++++ b/editor/libeditor/EditorDOMPoint.h
+@@ -303,16 +303,19 @@ class EditorDOMPointBase final {
+    * If it's set with aOffset, mChild is invalidated.  If it's set with aChild,
+    * mOffset may be invalidated.
+    */
+   void Set(nsINode* aContainer, int32_t aOffset) {
+     mParent = aContainer;
+     mChild = nullptr;
+     mOffset = mozilla::Some(aOffset);
+     mIsChildInitialized = false;
++
++    MOZ_ASSERT(!mParent || mOffset.value() <= mParent->Length());
++
+     NS_ASSERTION(!mParent || mOffset.value() <= mParent->Length(),
+                  "The offset is out of bounds");
+   }
+   void Set(const nsINode* aChild) {
+     MOZ_ASSERT(aChild);
+     if (NS_WARN_IF(!aChild->IsContent())) {
+       Clear();
+       return;