Fix crasher in cite extension from accessing data after it's stored

Follow up to b0f2adc

Change-Id: I840924ba1ba1b7af963d541c2cb6619543fbe69d
This commit is contained in:
Arlo Breault 2019-02-19 13:05:10 -05:00
parent f2948cd170
commit a8be3ad6e4

View file

@ -102,7 +102,9 @@ Ref.prototype.serialHandler = {
// n.b. this is going to drop any diff markers but since
// the dom differ doesn't traverse into extension content
// none should exist anyways.
html = ContentUtils.ppToXML(bodyElt, { innerXML: true });
DOMDataUtils.visitAndStoreDataAttribs(bodyElt);
html = ContentUtils.toXML(bodyElt, { innerXML: true });
DOMDataUtils.visitAndLoadDataAttribs(bodyElt);
} else {
// Some extra debugging for VisualEditor
var extraDebug = '';