| Index: Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| diff --git a/Source/bindings/core/v8/DictionaryHelperForCore.cpp b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| index dc872c6d5e129a1df9fc5d1439d05f6fe2339fc4..33f3ccd9fe2919b6655cd2e04c9bf79a871972f8 100644
|
| --- a/Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| +++ b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| @@ -390,6 +390,36 @@ bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, Vect
|
| return true;
|
| }
|
|
|
| +// FIXME: Remove this special casing. We should either remove DictionaryHelper
|
| +// completely, or auto-generate DictionaryHelper::get<T>() if needed.
|
| +template <>
|
| +bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, RefPtrWillBeMember<Element>& value)
|
| +{
|
| + v8::Local<v8::Value> v8Value;
|
| + if (!dictionary.get(key, v8Value))
|
| + return false;
|
| +
|
| + value = V8Element::toNativeWithTypeCheck(dictionary.isolate(), v8Value);
|
| + return true;
|
| +}
|
| +
|
| +// FIXME: Remove this. See above comment.
|
| +template <>
|
| +bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, WillBeHeapVector<RefPtrWillBeMember<Element> >& value)
|
| +{
|
| + v8::Local<v8::Value> v8Value;
|
| + if (!dictionary.get(key, v8Value))
|
| + return false;
|
| + if (!v8Value->IsArray())
|
| + return false;
|
| + v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value);
|
| + for (size_t i = 0; i < v8Array->Length(); ++i) {
|
| + v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Uint32::New(dictionary.isolate(), i));
|
| + value.append(V8Element::toNativeWithTypeCheck(dictionary.isolate(), indexedValue));
|
| + }
|
| + return true;
|
| +}
|
| +
|
| template <>
|
| bool DictionaryHelper::convert(const Dictionary& dictionary, Dictionary::ConversionContext& context, const String& key, Vector<String>& value)
|
| {
|
|
|