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

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

Issue 47073007: Bindings: Remove special cases for DOMStringList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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 | « Source/bindings/v8/V8Binding.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Binding.cpp
diff --git a/Source/bindings/v8/V8Binding.cpp b/Source/bindings/v8/V8Binding.cpp
index 5353e9a0bde7a7cf0a541bb78d731115884764f6..5b901548641bc587e77fcb3718f60c7790efaec5 100644
--- a/Source/bindings/v8/V8Binding.cpp
+++ b/Source/bindings/v8/V8Binding.cpp
@@ -31,7 +31,6 @@
#include "config.h"
#include "bindings/v8/V8Binding.h"
-#include "V8DOMStringList.h"
#include "V8Element.h"
#include "V8NodeFilter.h"
#include "V8Window.h"
@@ -43,7 +42,6 @@
#include "bindings/v8/V8WindowShell.h"
#include "bindings/v8/WorkerScriptController.h"
#include "bindings/v8/custom/V8CustomXPathNSResolver.h"
-#include "core/dom/DOMStringList.h"
#include "core/dom/Element.h"
#include "core/dom/NodeFilter.h"
#include "core/dom/QualifiedName.h"
@@ -124,17 +122,6 @@ v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator()
return &arrayBufferAllocator;
}
-
-v8::Handle<v8::Value> v8Array(PassRefPtr<DOMStringList> stringList, v8::Isolate* isolate)
-{
- if (!stringList)
- return v8::Array::New();
- v8::Local<v8::Array> result = v8::Array::New(stringList->length());
- for (unsigned i = 0; i < stringList->length(); ++i)
- result->Set(v8::Integer::New(i, isolate), v8String(stringList->item(i), isolate));
- return result;
-}
-
Vector<v8::Handle<v8::Value> > toVectorOfArguments(const v8::FunctionCallbackInfo<v8::Value>& info)
{
Vector<v8::Handle<v8::Value> > result;
@@ -385,28 +372,6 @@ v8::Handle<v8::FunctionTemplate> createRawTemplate(v8::Isolate* isolate)
return scope.Close(result);
}
-PassRefPtr<DOMStringList> toDOMStringList(v8::Handle<v8::Value> value, v8::Isolate* isolate)
-{
- v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(isolate, value));
-
- if (V8DOMStringList::HasInstance(v8Value, isolate, worldType(isolate))) {
- RefPtr<DOMStringList> ret = V8DOMStringList::toNative(v8::Handle<v8::Object>::Cast(v8Value));
- return ret.release();
- }
-
- if (!v8Value->IsArray())
- return 0;
-
- RefPtr<DOMStringList> ret = DOMStringList::create();
- v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value);
- for (size_t i = 0; i < v8Array->Length(); ++i) {
- v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Integer::New(i, isolate));
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue, indexedValue, 0);
- ret->append(stringValue);
- }
- return ret.release();
-}
-
PassRefPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value> value, v8::Isolate* isolate)
{
RefPtr<XPathNSResolver> resolver;
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698