Chromium Code Reviews| Index: lib/string.cc |
| =================================================================== |
| --- lib/string.cc (revision 17436) |
| +++ lib/string.cc (working copy) |
| @@ -123,8 +123,7 @@ |
| static int32_t StringValueAt(const String& str, const Integer& index) { |
| if (index.IsSmi()) { |
| - Smi& smi = Smi::Handle(); |
| - smi |= index.raw(); |
| + const Smi& smi = Smi::Cast(index); |
| int32_t index = smi.Value(); |
| if ((index < 0) || (index >= str.Length())) { |
| const Array& args = Array::Handle(Array::New(1)); |