Index: Source/bindings/v8/V8StringResource.h |
diff --git a/Source/bindings/v8/V8StringResource.h b/Source/bindings/v8/V8StringResource.h |
index 31f17813476f72edf49b0dda46d0e0fe7697995b..816e9875970bed4f6097f9ac922ab9558abc6b18 100644 |
--- a/Source/bindings/v8/V8StringResource.h |
+++ b/Source/bindings/v8/V8StringResource.h |
@@ -181,8 +181,8 @@ public: |
} |
bool prepare(); |
- operator String() { return toString<String>(); } |
- operator AtomicString() { return toString<AtomicString>(); } |
+ operator String() const { return toString<String>(); } |
+ operator AtomicString() const { return toString<AtomicString>(); } |
private: |
bool prepareBase() |
@@ -216,10 +216,10 @@ private: |
} |
template <class StringType> |
- StringType toString() |
+ StringType toString() const |
{ |
if (LIKELY(!m_v8Object.IsEmpty())) |
- return v8StringToWebCoreString<StringType>(m_v8Object.As<v8::String>(), m_mode); |
+ return v8StringToWebCoreString<StringType>(const_cast<v8::Handle<v8::Value>*>(&m_v8Object)->As<v8::String>(), m_mode); |
return StringType(m_string); |
} |