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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ToV8.h

Issue 1406923009: Rename DISALLOW_ALLOCATION and ALLOW_ONLY_INLINE_ALLOCATION (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ToV8_h 5 #ifndef ToV8_h
6 #define ToV8_h 6 #define ToV8_h
7 7
8 // toV8() provides C++ -> V8 conversion. Note that toV8() can return an empty 8 // toV8() provides C++ -> V8 conversion. Note that toV8() can return an empty
9 // handle. Call sites must check IsEmpty() before using return value. 9 // handle. Call sites must check IsEmpty() before using return value.
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Identity operator 167 // Identity operator
168 168
169 inline v8::Local<v8::Value> toV8(v8::Local<v8::Value> value, v8::Local<v8::Objec t> creationContext, v8::Isolate*) 169 inline v8::Local<v8::Value> toV8(v8::Local<v8::Value> value, v8::Local<v8::Objec t> creationContext, v8::Isolate*)
170 { 170 {
171 return value; 171 return value;
172 } 172 }
173 173
174 // Undefined 174 // Undefined
175 175
176 struct ToV8UndefinedGenerator { 176 struct ToV8UndefinedGenerator {
177 DISALLOW_ALLOCATION(); 177 DISALLOW_NEW();
178 }; // Used only for having toV8 return v8::Undefined. 178 }; // Used only for having toV8 return v8::Undefined.
179 179
180 inline v8::Local<v8::Value> toV8(const ToV8UndefinedGenerator& value, v8::Local <v8::Object> creationContext, v8::Isolate* isolate) 180 inline v8::Local<v8::Value> toV8(const ToV8UndefinedGenerator& value, v8::Local <v8::Object> creationContext, v8::Isolate* isolate)
181 { 181 {
182 return v8::Undefined(isolate); 182 return v8::Undefined(isolate);
183 } 183 }
184 184
185 // ScriptValue 185 // ScriptValue
186 186
187 inline v8::Local<v8::Value> toV8(const ScriptValue& value, v8::Local<v8::Object> creationContext, v8::Isolate*) 187 inline v8::Local<v8::Value> toV8(const ScriptValue& value, v8::Local<v8::Object> creationContext, v8::Isolate*)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Without toV8(void*, ...), call to toV8 with T* will match with 247 // Without toV8(void*, ...), call to toV8 with T* will match with
248 // toV8(bool, ...) if T is not a subclass of ScriptWrappable or if T is 248 // toV8(bool, ...) if T is not a subclass of ScriptWrappable or if T is
249 // declared but not defined (so it's not clear that T is a subclass of 249 // declared but not defined (so it's not clear that T is a subclass of
250 // ScriptWrappable). 250 // ScriptWrappable).
251 // This hack helps detect such unwanted implicit conversions from T* to bool. 251 // This hack helps detect such unwanted implicit conversions from T* to bool.
252 v8::Local<v8::Value> toV8(void* value, v8::Local<v8::Object> creationContext, v8 ::Isolate*) = delete; 252 v8::Local<v8::Value> toV8(void* value, v8::Local<v8::Object> creationContext, v8 ::Isolate*) = delete;
253 253
254 } // namespace blink 254 } // namespace blink
255 255
256 #endif // ToV8_h 256 #endif // ToV8_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698