diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/RegExpPrototype.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/RegExpPrototype.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/runtime/RegExpPrototype.cpp b/Source/JavaScriptCore/runtime/RegExpPrototype.cpp index 24c7c8027..3c742a0d3 100644 --- a/Source/JavaScriptCore/runtime/RegExpPrototype.cpp +++ b/Source/JavaScriptCore/runtime/RegExpPrototype.cpp @@ -34,7 +34,6 @@ #include "RegExp.h" #include "RegExpCache.h" #include "StringRecursionChecker.h" -#include "UStringConcatenate.h" namespace JSC { @@ -107,10 +106,10 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec) if (arg0.inherits(&RegExpObject::s_info)) { if (!arg1.isUndefined()) - return throwVMError(exec, createTypeError(exec, "Cannot supply flags when constructing one RegExp from another.")); + return throwVMError(exec, createTypeError(exec, ASCIILiteral("Cannot supply flags when constructing one RegExp from another."))); regExp = asRegExpObject(arg0)->regExp(); } else { - UString pattern = !exec->argumentCount() ? UString("") : arg0.toString(exec)->value(exec); + String pattern = !exec->argumentCount() ? String("") : arg0.toString(exec)->value(exec); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -120,7 +119,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec) if (exec->hadException()) return JSValue::encode(jsUndefined()); if (flags == InvalidFlags) - return throwVMError(exec, createSyntaxError(exec, "Invalid flags supplied to RegExp constructor.")); + return throwVMError(exec, createSyntaxError(exec, ASCIILiteral("Invalid flags supplied to RegExp constructor."))); } regExp = RegExp::create(exec->globalData(), pattern, flags); } @@ -153,7 +152,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState* exec) postfix[index++] = 'i'; if (thisObject->get(exec, exec->propertyNames().multiline).toBoolean(exec)) postfix[index] = 'm'; - UString source = thisObject->get(exec, exec->propertyNames().source).toString(exec)->value(exec); + String source = thisObject->get(exec, exec->propertyNames().source).toString(exec)->value(exec); // If source is empty, use "/(?:)/" to avoid colliding with comment syntax return JSValue::encode(jsMakeNontrivialString(exec, "/", source, postfix)); } |