}
template <>
-bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, MessagePortArray& value)
-{
- v8::Local<v8::Value> v8Value;
- if (!dictionary.get(key, v8Value))
- return false;
-
- ASSERT(dictionary.isolate());
- ASSERT(dictionary.isolate() == v8::Isolate::GetCurrent());
- if (blink::isUndefinedOrNull(v8Value))
- return true;
- bool success = false;
- value = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(v8Value, key, dictionary.isolate(), &success);
- return success;
-}
-
-template <>
bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, HashSet<AtomicString>& value)
{
v8::Local<v8::Value> v8Value;
// we add them.
v8::Handle<v8::Object> track = V8TextTrack::findInstanceInPrototypeChain(wrapper, dictionary.isolate());
if (!track.IsEmpty())
- source = V8TextTrack::toNative(track);
+ source = V8TextTrack::toImpl(track);
}
value = source;
return true;
typedef V8Storage type;
};
+template <>
+struct DictionaryHelperTraits<Element> {
+ typedef V8Element type;
+};
+
+template <>
+struct DictionaryHelperTraits<Path2D> {
+ typedef V8Path2D type;
+};
+
template bool DictionaryHelper::get(const Dictionary&, const String& key, RefPtr<Uint8Array>& value);
template bool DictionaryHelper::get(const Dictionary&, const String& key, RefPtr<ArrayBufferView>& value);
template bool DictionaryHelper::get(const Dictionary&, const String& key, RefPtrWillBeMember<MediaKeyError>& value);
template bool DictionaryHelper::get(const Dictionary&, const String& key, RefPtrWillBeMember<DOMError>& value);
template bool DictionaryHelper::get(const Dictionary&, const String& key, RefPtrWillBeMember<Storage>& value);
+template bool DictionaryHelper::get(const Dictionary&, const String& key, RefPtrWillBeMember<Element>& value);
+template bool DictionaryHelper::get(const Dictionary&, const String& key, RawPtr<Element>& value);
+template bool DictionaryHelper::get(const Dictionary&, const String& key, RefPtrWillBeMember<Path2D>& value);
+template bool DictionaryHelper::get(const Dictionary&, const String& key, RawPtr<Path2D>& value);
template <typename T>
struct IntegralTypeTraits {
if (!dictionary.get(key, v8Value))
return true;
- return DictionaryHelper::get(dictionary, key, value);
+ ASSERT(dictionary.isolate());
+ ASSERT(dictionary.isolate() == v8::Isolate::GetCurrent());
+
+ if (isUndefinedOrNull(v8Value))
+ return true;
+
+ value = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(v8Value, key, dictionary.isolate(), context.exceptionState());
+
+ if (context.exceptionState().throwIfNeeded())
+ return false;
+
+ return true;
}
} // namespace blink