Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: Source/bindings/v8/V8StringResource.h

Issue 23812006: Have Dictionary use V8TRYCATCH_FOR_V8STRINGRESOURCE() macro (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8BindingMacros.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/bindings/v8/V8BindingMacros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698