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

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

Issue 1027613002: [bindings] Refactor NativeValueTraits<T>::nativeValue to accept isolate as first parameter. (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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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