nsSVGRect::SetValueString(const nsAString& aValue) { nsresult rv = NS_OK;  char* str = ToNewCString(aValue);  char* rest = str; char* token; const char* delimiters = ",\x20\x9\xD\xA";  double vals[4]; int i; for (i=0;i<4;++i) { if (!(token = nsCRT::strtok(rest, delimiters, &rest))) break;  char *end; vals[i] = PR_strtod(token, &end); if (*end != '\0') break; } if (i!=4 || (nsCRT::strtok(rest, delimiters, &rest)!=0)) {  rv = NS_ERROR_FAILURE; } else { WillModify(); mX      = float(vals[0]); mY      = float(vals[1]); mWidth  = float(vals[2]); mHeight = float(vals[3]); DidModify(); }  nsMemory::Free(str);  return rv; }
NS_IMETHODIMP SetValueString(const nsAString&) { return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
nsSVGRect::SetValueString(const nsAString& aValue){  nsresult rv = NS_OK;  char* str = ToNewCString(aValue);  char* rest = str;  char* token;  const char* delimiters = ",\x20\x9\xD\xA";  double vals[4];  int i;  for (i=0;i<4;++i) {    if (!(token = nsCRT::strtok(rest, delimiters, &rest))) break; // parse error    char *end;    vals[i] = PR_strtod(token, &end);    if (*end != '\0') break; // parse error  }  if (i!=4 || (nsCRT::strtok(rest, delimiters, &rest)!=0)) {    // there was a parse error.    rv = NS_ERROR_FAILURE;  }  else {    WillModify();    mX      = float(vals[0]);    mY      = float(vals[1]);    mWidth  = float(vals[2]);    mHeight = float(vals[3]);    DidModify();  }  nsMemory::Free(str);  return rv;}