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

Unified Diff: Source/bindings/v8/V8Binding.h

Issue 139803012: Move speech module over to Oilpan. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make SpeechSynthesisVoice GC-finalized Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/V8Binding.h
diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h
index de4d146b8970d8db2179d2423aafac4bfaf40961..07b15c20d1c153ef81b9c700c5c6d22c74f21f84 100644
--- a/Source/bindings/v8/V8Binding.h
+++ b/Source/bindings/v8/V8Binding.h
@@ -285,6 +285,18 @@ namespace WebCore {
return result;
}
+ template<typename T, size_t inlineCapacity>
+ v8::Handle<v8::Value> v8Array(const HeapVector<T, inlineCapacity>& iterator, v8::Isolate* isolate)
+ {
+ v8::Local<v8::Array> result = v8::Array::New(isolate, iterator.size());
+ int index = 0;
+ typename HeapVector<T, inlineCapacity>::const_iterator end = iterator.end();
+ typedef V8ValueTraits<T> TraitsType;
+ for (typename HeapVector<T, inlineCapacity>::const_iterator iter = iterator.begin(); iter != end; ++iter)
+ result->Set(v8::Integer::New(isolate, index++), TraitsType::arrayV8Value(*iter, isolate));
+ return result;
+ }
+
// Conversion flags, used in toIntXX/toUIntXX.
enum IntegerConversionConfiguration {
NormalConversion,
« no previous file with comments | « Source/bindings/v8/Dictionary.cpp ('k') | Source/heap/Handle.h » ('j') | Source/heap/Visitor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698