Upstream version 9.37.197.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / v8 / custom / V8HTMLAllCollectionCustom.cpp
index 4db5f1b..c038374 100644 (file)
  */
 
 #include "config.h"
-#include "V8HTMLAllCollection.h"
+#include "bindings/core/v8/V8HTMLAllCollection.h"
 
-#include "V8Element.h"
-#include "V8NodeList.h"
+#include "bindings/core/v8/V8Element.h"
+#include "bindings/core/v8/V8NodeList.h"
 #include "bindings/v8/V8Binding.h"
 #include "core/dom/NamedNodesCollection.h"
 #include "core/html/HTMLAllCollection.h"
@@ -43,7 +43,7 @@ namespace WebCore {
 template<class CallbackInfo>
 static v8::Handle<v8::Value> getNamedItems(HTMLAllCollection* collection, AtomicString name, const CallbackInfo& info)
 {
-    Vector<RefPtr<Element> > namedItems;
+    WillBeHeapVector<RefPtrWillBeMember<Element> > namedItems;
     collection->namedItems(name, namedItems);
 
     if (!namedItems.size())
@@ -62,7 +62,7 @@ static v8::Handle<v8::Value> getItem(HTMLAllCollection* collection, v8::Handle<v
 {
     v8::Local<v8::Uint32> index = argument->ToArrayIndex();
     if (index.IsEmpty()) {
-        V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, name, argument, v8::Undefined(info.GetIsolate()));
+        TOSTRING_DEFAULT(V8StringResource<>, name, argument, v8::Undefined(info.GetIsolate()));
         v8::Handle<v8::Value> result = getNamedItems(collection, name, info);
 
         if (result.IsEmpty())
@@ -71,7 +71,7 @@ static v8::Handle<v8::Value> getItem(HTMLAllCollection* collection, v8::Handle<v
         return result;
     }
 
-    RefPtr<Element> result = collection->item(index->Uint32Value());
+    RefPtrWillBeRawPtr<Element> result = collection->item(index->Uint32Value());
     return toV8(result.release(), info.Holder(), info.GetIsolate());
 }
 
@@ -97,7 +97,7 @@ void V8HTMLAllCollection::legacyCallCustom(const v8::FunctionCallbackInfo<v8::Va
     }
 
     // If there is a second argument it is the index of the item we want.
-    V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]);
+    TOSTRING_VOID(V8StringResource<>, name, info[0]);
     v8::Local<v8::Uint32> index = info[1]->ToArrayIndex();
     if (index.IsEmpty())
         return;