OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 return m_isolate->GetCurrentContext(); | 131 return m_isolate->GetCurrentContext(); |
132 } | 132 } |
133 | 133 |
134 v8::Handle<v8::Value> m_options; | 134 v8::Handle<v8::Value> m_options; |
135 v8::Isolate* m_isolate; | 135 v8::Isolate* m_isolate; |
136 ExceptionState* m_exceptionState; | 136 ExceptionState* m_exceptionState; |
137 }; | 137 }; |
138 | 138 |
139 template<> | 139 template<> |
140 struct NativeValueTraits<Dictionary> { | 140 struct NativeValueTraits<Dictionary> { |
141 static inline Dictionary nativeValue(v8::Handle<v8::Value> value, v8::Isolat
e* isolate, ExceptionState& exceptionState) | 141 static inline Dictionary nativeValue(v8::Isolate* isolate, v8::Handle<v8::Va
lue> value, ExceptionState& exceptionState) |
142 { | 142 { |
143 return Dictionary(value, isolate, exceptionState); | 143 return Dictionary(value, isolate, exceptionState); |
144 } | 144 } |
145 }; | 145 }; |
146 | 146 |
147 // DictionaryHelper is a collection of static methods for getting or | 147 // DictionaryHelper is a collection of static methods for getting or |
148 // converting a value from Dictionary. | 148 // converting a value from Dictionary. |
149 struct DictionaryHelper { | 149 struct DictionaryHelper { |
150 template <typename T> | 150 template <typename T> |
151 static bool get(const Dictionary&, const String& key, T& value); | 151 static bool get(const Dictionary&, const String& key, T& value); |
(...skipping 15 matching lines...) Expand all Loading... |
167 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const
String& key, T& value); | 167 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const
String& key, T& value); |
168 template <typename T> | 168 template <typename T> |
169 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const
String& key, Nullable<T>& value); | 169 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const
String& key, Nullable<T>& value); |
170 template <template <typename> class PointerType, typename T> | 170 template <template <typename> class PointerType, typename T> |
171 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const
String& key, PointerType<T>& value); | 171 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const
String& key, PointerType<T>& value); |
172 }; | 172 }; |
173 | 173 |
174 } | 174 } |
175 | 175 |
176 #endif // Dictionary_h | 176 #endif // Dictionary_h |
OLD | NEW |