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

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

Issue 2532883002: binding: Removes unused toV8 functions. (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 CORE_EXPORT v8::Local<v8::Value> toV8(DOMWindow*, 62 CORE_EXPORT v8::Local<v8::Value> toV8(DOMWindow*,
63 v8::Local<v8::Object> creationContext, 63 v8::Local<v8::Object> creationContext,
64 v8::Isolate*); 64 v8::Isolate*);
65 CORE_EXPORT v8::Local<v8::Value> toV8(EventTarget*, 65 CORE_EXPORT v8::Local<v8::Value> toV8(EventTarget*,
66 v8::Local<v8::Object> creationContext, 66 v8::Local<v8::Object> creationContext,
67 v8::Isolate*); 67 v8::Isolate*);
68 v8::Local<v8::Value> toV8(WorkerOrWorkletGlobalScope*, 68 v8::Local<v8::Value> toV8(WorkerOrWorkletGlobalScope*,
69 v8::Local<v8::Object> creationContext, 69 v8::Local<v8::Object> creationContext,
70 v8::Isolate*); 70 v8::Isolate*);
71 71
72 // PassRefPtr and RefPtr
73
74 template <typename T>
75 inline v8::Local<v8::Value> toV8(PassRefPtr<T> impl,
76 v8::Local<v8::Object> creationContext,
77 v8::Isolate* isolate) {
78 return toV8(impl.get(), creationContext, isolate);
79 }
80
81 template <typename T>
82 inline v8::Local<v8::Value> toV8(const RefPtr<T>& impl,
83 v8::Local<v8::Object> creationContext,
84 v8::Isolate* isolate) {
85 return toV8(impl.get(), creationContext, isolate);
86 }
87
88 // Primitives 72 // Primitives
89 73
90 inline v8::Local<v8::Value> toV8(const String& value, 74 inline v8::Local<v8::Value> toV8(const String& value,
91 v8::Local<v8::Object> creationContext, 75 v8::Local<v8::Object> creationContext,
92 v8::Isolate* isolate) { 76 v8::Isolate* isolate) {
93 return v8String(isolate, value); 77 return v8String(isolate, value);
94 } 78 }
95 79
96 inline v8::Local<v8::Value> toV8(const char* value, 80 inline v8::Local<v8::Value> toV8(const char* value,
97 v8::Local<v8::Object> creationContext, 81 v8::Local<v8::Object> creationContext,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Cannot define in ScriptValue because of the circular dependency between toV8 303 // Cannot define in ScriptValue because of the circular dependency between toV8
320 // and ScriptValue 304 // and ScriptValue
321 template <typename T> 305 template <typename T>
322 inline ScriptValue ScriptValue::from(ScriptState* scriptState, T&& value) { 306 inline ScriptValue ScriptValue::from(ScriptState* scriptState, T&& value) {
323 return ScriptValue(scriptState, toV8(std::forward<T>(value), scriptState)); 307 return ScriptValue(scriptState, toV8(std::forward<T>(value), scriptState));
324 } 308 }
325 309
326 } // namespace blink 310 } // namespace blink
327 311
328 #endif // ToV8_h 312 #endif // ToV8_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698