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

Unified Diff: Source/bindings/core/v8/DictionaryHelperForCore.cpp

Issue 386963003: [WIP][NotForLand] IDL dictionary support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
Index: Source/bindings/core/v8/DictionaryHelperForCore.cpp
diff --git a/Source/bindings/core/v8/DictionaryHelperForCore.cpp b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
index 10053bcb5af55c8cd7a586daa543049fc0c65fa2..fd83042029d73fee3dd126848e93bc1a4c1999f2 100644
--- a/Source/bindings/core/v8/DictionaryHelperForCore.cpp
+++ b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
@@ -390,6 +390,18 @@ bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, Vect
return true;
}
+// FIXME: remove
haraken 2014/07/21 16:11:59 Would you elaborate on this comment?
bashi 2014/07/22 02:33:56 Done.
+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;
+}
+
template <>
bool DictionaryHelper::convert(const Dictionary& dictionary, Dictionary::ConversionContext& context, const String& key, Vector<String>& value)
{

Powered by Google App Engine
This is Rietveld 408576698