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

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

Issue 196383035: Fix promise resolution of FontFaceSet#load() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 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 1d2d7ce85842cbe5b2719d6233caa6243784e2a2..3e1e3d556611ab4c9011aa7580e1e0cce070f057 100644
--- a/Source/bindings/v8/V8Binding.h
+++ b/Source/bindings/v8/V8Binding.h
@@ -292,6 +292,17 @@ v8::Handle<v8::Value> v8Array(const HeapVector<T, inlineCapacity>& iterator, v8:
return result;
}
+template<typename T, size_t inlineCapacity>
+v8::Handle<v8::Value> v8ArrayNoInline(const Vector<T, inlineCapacity>& iterator, v8::Isolate* isolate)
haraken 2014/03/19 08:31:58 I don't fully understand why you call this v8Array
Kunihiko Sakamoto 2014/03/19 09:12:17 Because this uses toV8NoInline(T) instead of toV8(
+{
+ v8::Local<v8::Array> result = v8::Array::New(isolate, iterator.size());
+ int index = 0;
+ typename Vector<T, inlineCapacity>::const_iterator end = iterator.end();
+ for (typename Vector<T, inlineCapacity>::const_iterator iter = iterator.begin(); iter != end; ++iter)
+ result->Set(v8::Integer::New(isolate, index++), toV8NoInline(WTF::getPtr(*iter), v8::Handle<v8::Object>(), isolate));
+ return result;
+}
+
// Conversion flags, used in toIntXX/toUIntXX.
enum IntegerConversionConfiguration {
NormalConversion,

Powered by Google App Engine
This is Rietveld 408576698