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

Unified Diff: sky/engine/bindings/core/v8/V8Binding.h

Issue 679113005: Hollow out more of the tracing system in oilpan (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/bindings/core/v8/ScriptPromisePropertyBase.h ('k') | sky/engine/core/css/FontFace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/core/v8/V8Binding.h
diff --git a/sky/engine/bindings/core/v8/V8Binding.h b/sky/engine/bindings/core/v8/V8Binding.h
index 0912745d4056259ca85299d756ee0ab2a5bf691f..f19d1a40678372a40e470233a1a5f615cf477a4b 100644
--- a/sky/engine/bindings/core/v8/V8Binding.h
+++ b/sky/engine/bindings/core/v8/V8Binding.h
@@ -607,39 +607,6 @@ struct NativeValueTraits<ScriptValue> {
v8::Handle<v8::Value> toV8Sequence(v8::Handle<v8::Value>, uint32_t& length, v8::Isolate*);
-template <class T, class V8T>
-HeapVector<Member<T> > toMemberNativeArray(v8::Handle<v8::Value> value, int argumentIndex, v8::Isolate* isolate, bool* success = 0)
-{
- if (success)
- *success = true;
-
- v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(isolate, value));
- uint32_t length = 0;
- if (value->IsArray()) {
- length = v8::Local<v8::Array>::Cast(v8Value)->Length();
- } else if (toV8Sequence(value, length, isolate).IsEmpty()) {
- V8ThrowException::throwTypeError(ExceptionMessages::notAnArrayTypeArgumentOrValue(argumentIndex), isolate);
- return HeapVector<Member<T> >();
- }
-
- HeapVector<Member<T> > result;
- result.reserveInitialCapacity(length);
- v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(v8Value);
- for (uint32_t i = 0; i < length; ++i) {
- v8::Handle<v8::Value> element = object->Get(i);
- if (V8T::hasInstance(element, isolate)) {
- v8::Handle<v8::Object> elementObject = v8::Handle<v8::Object>::Cast(element);
- result.uncheckedAppend(V8T::toNative(elementObject));
- } else {
- if (success)
- *success = false;
- V8ThrowException::throwTypeError("Invalid Array element type", isolate);
- return HeapVector<Member<T> >();
- }
- }
- return result;
-}
-
// Converts a JavaScript value to an array as per the Web IDL specification:
// http://www.w3.org/TR/2012/CR-WebIDL-20120419/#es-array
template <class T>
« no previous file with comments | « sky/engine/bindings/core/v8/ScriptPromisePropertyBase.h ('k') | sky/engine/core/css/FontFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698