errorCode = processor(parser, bufferPtr, parseEndPtr = bufferEnd, 0); if (errorCode == XML_ERROR_NONE) return XML_STATUS_OK;  if (errorCode == XML_ERROR_SUSPENDED) { bufferPtr = eventPtr; parseEndPtr = eventEndPtr; XmlUpdatePosition(encoding, positionPtr, eventEndPtr, &position); return XML_STATUS_ERROR;
parseEndPtr = bufferEnd;   errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr);  if (errorCode == XML_ERROR_NONE) { switch (parsing) { case XML_SUSPENDED: XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); positionPtr = bufferPtr; return XML_STATUS_SUSPENDED; case XML_INITIALIZED: case XML_PARSING: parsing = XML_FINISHED;  default: return XML_STATUS_OK; }
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal){/* BEGIN MOZILLA CHANGE (Blocking parser) */  if (blocked) {    /* First unblock parser */    return XML_STATUS_ERROR;  }/* END MOZILLA CHANGE */  if (len == 0) {    if (!isFinal)      return XML_STATUS_OK;    positionPtr = bufferPtr;    errorCode = processor(parser, bufferPtr, parseEndPtr = bufferEnd, 0);    if (errorCode == XML_ERROR_NONE)      return XML_STATUS_OK;/* BEGIN MOZILLA CHANGE (Blocking parser) */    if (errorCode == XML_ERROR_SUSPENDED) {      bufferPtr = eventPtr;      parseEndPtr = eventEndPtr;      XmlUpdatePosition(encoding, positionPtr, eventEndPtr, &position);      return XML_STATUS_ERROR;    }/* END MOZILLA CHANGE */    eventEndPtr = eventPtr;    processor = errorProcessor;    return XML_STATUS_ERROR;  }#ifndef XML_CONTEXT_BYTES  else if (bufferPtr == bufferEnd) {    const char *end;    int nLeftOver;    parseEndByteIndex += len;    positionPtr = s;    if (isFinal) {      errorCode = processor(parser, s, parseEndPtr = s + len, 0);      if (errorCode == XML_ERROR_NONE)        return XML_STATUS_OK;      eventEndPtr = eventPtr;      processor = errorProcessor;      return XML_STATUS_ERROR;    }    errorCode = processor(parser, s, parseEndPtr = s + len, &end);    if (errorCode != XML_ERROR_NONE) {/* BEGIN MOZILLA CHANGE (Blocking parser) */      if (blocked) {        parseEndPtr = eventEndPtr;        parseEndByteIndex -= len - (eventPtr - s); /* This is how much we've read thus far*/        XmlUpdatePosition(encoding, positionPtr, eventEndPtr, &position);        eventEndPtr = eventPtr;        return XML_STATUS_ERROR;      }/* END MOZILLA CHANGE */      eventEndPtr = eventPtr;      processor = errorProcessor;      return XML_STATUS_ERROR;    }    XmlUpdatePosition(encoding, positionPtr, end, &position);    positionPtr = end;    nLeftOver = s + len - end;    if (nLeftOver) {      if (buffer == NULL || nLeftOver > bufferLim - buffer) {        /* FIXME avoid integer overflow */        char *temp;        temp = (buffer == NULL                ? (char *)MALLOC(len * 2)                : (char *)REALLOC(buffer, len * 2));        if (temp == NULL) {          errorCode = XML_ERROR_NO_MEMORY;          return XML_STATUS_ERROR;        }        buffer = temp;        if (!buffer) {          errorCode = XML_ERROR_NO_MEMORY;          eventPtr = eventEndPtr = NULL;          processor = errorProcessor;          return XML_STATUS_ERROR;        }        bufferLim = buffer + len * 2;      }      memcpy(buffer, end, nLeftOver);      bufferPtr = buffer;      bufferEnd = buffer + nLeftOver;    }    return XML_STATUS_OK;  }#endif  /* not defined XML_CONTEXT_BYTES */  else {    void *buff = XML_GetBuffer(parser, len);    if (buff == NULL)      return XML_STATUS_ERROR;    else {      memcpy(buff, s, len);      return XML_ParseBuffer(parser, len, isFinal);    }  }}