To reproduce, run `./mach reftest --disable-e10s <filename>` or replace <filename> with `layout/reftest/reftest.list`. TEST-UNEXPECTED-FAIL | file:///home/shinglyu/workspace/stylo/gecko-dev/layout/reftests/margin-collapsing/block-xhtml-root-1a.xhtml | application terminated with exit code 11 REFTEST PROCESS-CRASH | file:///home/shinglyu/workspace/stylo/gecko-dev/layout/reftests/margin-collapsing/block-xhtml-root-1a.xhtml | application crashed [None] Assertion failure: aNameSpaceID > 0 && (int64_t) aNameSpaceID <= (int64_t) mURIArray.Length(), at /files/mozilla/stylo/bb/gecko/dom/base/nsNameSpaceManager.h:43 ç \#01: nsNameSpaceManager::NameSpaceURIAtom(int) (nsNameSpaceManager.h:43, in XUL) #02: Gecko_Namespace (ServoBindings.cpp:158, in XUL) #03: _$LT$wrapper..GeckoElement$LT$$u27$le$GT$$u20$as$u20$selectors..Element$GT$::get_namespace::h7a2f0ddcbd2acca7 (wrapper.rs:468, in XUL)
Created attachment 8778465 [details] [diff] [review] Zero-index the namespace manager URIs. v1 The current setup here tries to "save" an entry in the list by checking for the "None" namespace everywhere and special-casing it. We can simplify this a lot by just adding the empty atom to the beginning of the array, which is the value that servo uses to represent "namespace none" anyway.
Comment on attachment 8778465 [details] [diff] [review] Zero-index the namespace manager URIs. v1 So this has two behavior changes: 1) GetNameSpaceURI will now happily hand out "" for kNameSpaceID_None. But calling GetNameSpaceURI for kNameSpaceID_None is arguably an error, and was treated as such by the old code. Please preserve the old behavior here. 2) NameSpaceURIAtom will now happily hand out "". This is the intentional part of this change. Please document this behavior, and document that this function should really be called only from servo code, where using "" to represent "no namespace" actually makes sense. If we can assert somehow that it's only called by servo code, that would be even better, but I can't see a way to do that. :( Maybe it should be renamed to indicate what it's expected to do? r=me with both of those things done.
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/2629e4786dd8 Zero-index the namespace manager URIs. r=bz