OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 v8::Handle<v8::Value> V8HTMLSelectElement::removeMethodCustom(const v8::Argument
s& args) | 67 v8::Handle<v8::Value> V8HTMLSelectElement::removeMethodCustom(const v8::Argument
s& args) |
68 { | 68 { |
69 HTMLSelectElement* imp = V8HTMLSelectElement::toNative(args.Holder()); | 69 HTMLSelectElement* imp = V8HTMLSelectElement::toNative(args.Holder()); |
70 return removeElement(imp, args); | 70 return removeElement(imp, args); |
71 } | 71 } |
72 | 72 |
73 v8::Handle<v8::Value> removeElement(HTMLSelectElement* imp, const v8::Arguments&
args) | 73 v8::Handle<v8::Value> removeElement(HTMLSelectElement* imp, const v8::Arguments&
args) |
74 { | 74 { |
75 if (V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate(), worldType(a
rgs.GetIsolate()))) { | 75 if (V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate(), worldType(a
rgs.GetIsolate()))) { |
76 HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8
::Object>::Cast(args[0])); | 76 Handle<HTMLOptionElement> element = adoptRawResult(V8HTMLOptionElement::
toNative(v8::Handle<v8::Object>::Cast(args[0]))); |
77 imp->remove(element->index()); | 77 imp->remove(element->index()); |
78 return v8::Undefined(); | 78 return v8::Undefined(); |
79 } | 79 } |
80 | 80 |
81 imp->remove(toInt32(args[0])); | 81 imp->remove(toInt32(args[0])); |
82 return v8::Undefined(); | 82 return v8::Undefined(); |
83 } | 83 } |
84 | 84 |
85 } // namespace WebCore | 85 } // namespace WebCore |
OLD | NEW |