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

Side by Side Diff: Source/bindings/core/v8/Dictionary.h

Issue 1006323002: [bindings] Pass v8::Local<v8::Value> by value in NativeValueTraits<T>::nativeValue() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/bindings/core/v8/NativeValueTraits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool getKey(const String& key, v8::Local<v8::Value>&) const; 125 bool getKey(const String& key, v8::Local<v8::Value>&) const;
126 126
127 private: 127 private:
128 v8::Handle<v8::Value> m_options; 128 v8::Handle<v8::Value> m_options;
129 v8::Isolate* m_isolate; 129 v8::Isolate* m_isolate;
130 ExceptionState* m_exceptionState; 130 ExceptionState* m_exceptionState;
131 }; 131 };
132 132
133 template<> 133 template<>
134 struct NativeValueTraits<Dictionary> { 134 struct NativeValueTraits<Dictionary> {
135 static inline Dictionary nativeValue(const v8::Handle<v8::Value>& value, v8: :Isolate* isolate, ExceptionState& exceptionState) 135 static inline Dictionary nativeValue(v8::Handle<v8::Value> value, v8::Isolat e* isolate, ExceptionState& exceptionState)
136 { 136 {
137 return Dictionary(value, isolate, exceptionState); 137 return Dictionary(value, isolate, exceptionState);
138 } 138 }
139 }; 139 };
140 140
141 // DictionaryHelper is a collection of static methods for getting or 141 // DictionaryHelper is a collection of static methods for getting or
142 // converting a value from Dictionary. 142 // converting a value from Dictionary.
143 struct DictionaryHelper { 143 struct DictionaryHelper {
144 template <typename T> 144 template <typename T>
145 static bool get(const Dictionary&, const String& key, T& value); 145 static bool get(const Dictionary&, const String& key, T& value);
(...skipping 15 matching lines...) Expand all
161 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const String& key, T& value); 161 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const String& key, T& value);
162 template <typename T> 162 template <typename T>
163 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const String& key, Nullable<T>& value); 163 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const String& key, Nullable<T>& value);
164 template <template <typename> class PointerType, typename T> 164 template <template <typename> class PointerType, typename T>
165 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const String& key, PointerType<T>& value); 165 static bool convert(const Dictionary&, Dictionary::ConversionContext&, const String& key, PointerType<T>& value);
166 }; 166 };
167 167
168 } 168 }
169 169
170 #endif // Dictionary_h 170 #endif // Dictionary_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/NativeValueTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698