Index: Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp b/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp |
index ee19d921d9db6da67c9f05143f520c25d4194dd3..61a545ac3c333f53734271b0fcd413818f0f344a 100644 |
--- a/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp |
+++ b/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp |
@@ -73,7 +73,7 @@ v8::Handle<v8::Value> V8HTMLSelectElement::removeMethodCustom(const v8::Argument |
v8::Handle<v8::Value> removeElement(HTMLSelectElement* imp, const v8::Arguments& args) |
{ |
if (V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))) { |
- HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>::Cast(args[0])); |
+ Handle<HTMLOptionElement> element = adoptRawResult(V8HTMLOptionElement::toNative(v8::Handle<v8::Object>::Cast(args[0]))); |
imp->remove(element->index()); |
return v8::Undefined(); |
} |