summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/API/OpaqueJSString.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/API/OpaqueJSString.h')
-rw-r--r--Source/JavaScriptCore/API/OpaqueJSString.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/API/OpaqueJSString.h b/Source/JavaScriptCore/API/OpaqueJSString.h
index 36680388d..0464e8813 100644
--- a/Source/JavaScriptCore/API/OpaqueJSString.h
+++ b/Source/JavaScriptCore/API/OpaqueJSString.h
@@ -41,6 +41,11 @@ struct OpaqueJSString : public ThreadSafeRefCounted<OpaqueJSString> {
return adoptRef(new OpaqueJSString);
}
+ static PassRefPtr<OpaqueJSString> create(const LChar* characters, unsigned length)
+ {
+ return adoptRef(new OpaqueJSString(characters, length));
+ }
+
static PassRefPtr<OpaqueJSString> create(const UChar* characters, unsigned length)
{
return adoptRef(new OpaqueJSString(characters, length));
@@ -51,7 +56,7 @@ struct OpaqueJSString : public ThreadSafeRefCounted<OpaqueJSString> {
const UChar* characters() { return !!this ? m_string.characters() : 0; }
unsigned length() { return !!this ? m_string.length() : 0; }
- String string() const;
+ JS_EXPORT_PRIVATE String string() const;
JSC::Identifier identifier(JSC::JSGlobalData*) const;
private:
@@ -70,6 +75,11 @@ private:
m_string = String(string.characters16(), string.length());
}
+ OpaqueJSString(const LChar* characters, unsigned length)
+ {
+ m_string = String(characters, length);
+ }
+
OpaqueJSString(const UChar* characters, unsigned length)
{
m_string = String(characters, length);