| Index: Source/bindings/v8/ScriptValue.h
|
| diff --git a/Source/bindings/v8/ScriptValue.h b/Source/bindings/v8/ScriptValue.h
|
| index 8ffa4caadbbf43c1d71b12bebb3287299daf76b9..7ecf070e13415162838905d8629f02bf5d7a270f 100644
|
| --- a/Source/bindings/v8/ScriptValue.h
|
| +++ b/Source/bindings/v8/ScriptValue.h
|
| @@ -154,12 +154,23 @@ public:
|
|
|
| private:
|
| mutable v8::Isolate* m_isolate;
|
| - // FIXME: m_scriptState is not yet used.
|
| - // We will start using it once we remove ScriptValue(v8::Handle<v8::Value> value, v8::Isolate* isolate).
|
| mutable RefPtr<ScriptState> m_scriptState;
|
| RefPtr<SharedPersistent<v8::Value> > m_value;
|
| };
|
|
|
| +struct ScriptValueHash {
|
| + static unsigned hash(const ScriptValue& object) { return v8::Handle<v8::Object>::Cast(object.v8Value())->GetIdentityHash(); }
|
| + static bool equal(const ScriptValue& a, const ScriptValue& b) { return a == b; }
|
| + static const bool safeToCompareToEmptyOrDeleted = true;
|
| +};
|
| +
|
| +struct ScriptValueHashTraits : WTF::GenericHashTraits<ScriptValue> {
|
| + static const bool emptyValueIsZero = false;
|
| + static ScriptValue emptyValue() { return ScriptValue(); }
|
| + static void constructDeletedValue(ScriptValue& slot) { slot = ScriptValue(); }
|
| + static bool isDeletedValue(ScriptValue value) { return value.isEmpty(); }
|
| +};
|
| +
|
| } // namespace WebCore
|
|
|
| #endif // ScriptValue_h
|
|
|