Use jsNontrivialString in more places if the string is guaranteed to be 2 or more...
[WebKit-https.git] / Source / JavaScriptCore / runtime / SymbolPrototype.cpp
index b8db161..2f4ac4d 100644 (file)
@@ -83,7 +83,7 @@ EncodedJSValue JSC_HOST_CALL symbolProtoFuncToString(ExecState* exec)
         symbol = asSymbol(jsCast<SymbolObject*>(thisObject)->internalValue());
     }
 
-    return JSValue::encode(jsString(exec, symbol->descriptiveString()));
+    return JSValue::encode(jsNontrivialString(exec, symbol->descriptiveString()));
 }
 
 EncodedJSValue JSC_HOST_CALL symbolProtoFuncValueOf(ExecState* exec)