template <V8StringResourceMode Mode = DefaultMode>
class V8StringResource {
public:
+ V8StringResource()
+ : m_mode(Externalize)
+ {
+ }
+
V8StringResource(v8::Handle<v8::Value> object)
: m_v8Object(object)
, m_mode(Externalize)
- , m_string()
{
}
+ void operator=(v8::Handle<v8::Value> object)
+ {
+ m_v8Object = object;
+ }
+
+ void operator=(const String& string)
+ {
+ setString(string);
+ }
+
bool prepare()
{
if (m_v8Object.IsEmpty())