diff --git a/mozilla/js/js2/interpreter.cpp b/mozilla/js/js2/interpreter.cpp index 20e10310fcb..e1b6705bc08 100644 --- a/mozilla/js/js2/interpreter.cpp +++ b/mozilla/js/js2/interpreter.cpp @@ -748,9 +748,9 @@ JSValue Context::interpret(ICodeModule* iCode, const JSValues& args) if (icm->itsParameters->mRestParameter != ParameterList::HasUnnamedRestParameter) { // if the name is a numeric literal >= 0, use it as an array index // otherwise just set the named property. - const char16 *c = argName->c_str(); + const char16 *c = argName->data(); const char16 *end; - double d = stringToDouble(c, c + argName->length(), end); + double d = stringToDouble(c, c + argName->size(), end); if ((d != d) || (d < 0) || (d != (int)d)) { // a non-numeric or negative value if (icm->itsParameters->mRestParameter == ParameterList::HasRestParameterBeforeBar) diff --git a/mozilla/js2/src/interpreter.cpp b/mozilla/js2/src/interpreter.cpp index 20e10310fcb..e1b6705bc08 100644 --- a/mozilla/js2/src/interpreter.cpp +++ b/mozilla/js2/src/interpreter.cpp @@ -748,9 +748,9 @@ JSValue Context::interpret(ICodeModule* iCode, const JSValues& args) if (icm->itsParameters->mRestParameter != ParameterList::HasUnnamedRestParameter) { // if the name is a numeric literal >= 0, use it as an array index // otherwise just set the named property. - const char16 *c = argName->c_str(); + const char16 *c = argName->data(); const char16 *end; - double d = stringToDouble(c, c + argName->length(), end); + double d = stringToDouble(c, c + argName->size(), end); if ((d != d) || (d < 0) || (d != (int)d)) { // a non-numeric or negative value if (icm->itsParameters->mRestParameter == ParameterList::HasRestParameterBeforeBar)