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

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

Issue 2386173002: reflow comments in Source/bindings/core/v8 (Closed)
Patch Set: Created 4 years, 2 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
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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // because of "unresolved external symbol". 309 // because of "unresolved external symbol".
310 // Without toV8(void*, ...), call to toV8 with T* will match with 310 // Without toV8(void*, ...), call to toV8 with T* will match with
311 // toV8(bool, ...) if T is not a subclass of ScriptWrappable or if T is 311 // toV8(bool, ...) if T is not a subclass of ScriptWrappable or if T is
312 // declared but not defined (so it's not clear that T is a subclass of 312 // declared but not defined (so it's not clear that T is a subclass of
313 // ScriptWrappable). 313 // ScriptWrappable).
314 // This hack helps detect such unwanted implicit conversions from T* to bool. 314 // This hack helps detect such unwanted implicit conversions from T* to bool.
315 v8::Local<v8::Value> toV8(void* value, 315 v8::Local<v8::Value> toV8(void* value,
316 v8::Local<v8::Object> creationContext, 316 v8::Local<v8::Object> creationContext,
317 v8::Isolate*) = delete; 317 v8::Isolate*) = delete;
318 318
319 // Cannot define in ScriptValue because of the circular dependency between toV8 and ScriptValue 319 // Cannot define in ScriptValue because of the circular dependency between toV8
320 // and ScriptValue
320 template <typename T> 321 template <typename T>
321 inline ScriptValue ScriptValue::from(ScriptState* scriptState, T&& value) { 322 inline ScriptValue ScriptValue::from(ScriptState* scriptState, T&& value) {
322 return ScriptValue(scriptState, toV8(std::forward<T>(value), scriptState)); 323 return ScriptValue(scriptState, toV8(std::forward<T>(value), scriptState));
323 } 324 }
324 325
325 } // namespace blink 326 } // namespace blink
326 327
327 #endif // ToV8_h 328 #endif // ToV8_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698