| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 12105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12116 | 12116 |
| 12117 Handle<Object> JSObject::SetElement(Handle<JSObject> object, | 12117 Handle<Object> JSObject::SetElement(Handle<JSObject> object, |
| 12118 uint32_t index, | 12118 uint32_t index, |
| 12119 Handle<Object> value, | 12119 Handle<Object> value, |
| 12120 PropertyAttributes attr, | 12120 PropertyAttributes attr, |
| 12121 StrictModeFlag strict_mode, | 12121 StrictModeFlag strict_mode, |
| 12122 SetPropertyMode set_mode) { | 12122 SetPropertyMode set_mode) { |
| 12123 if (object->HasExternalArrayElements()) { | 12123 if (object->HasExternalArrayElements()) { |
| 12124 if (!value->IsNumber() && !value->IsUndefined()) { | 12124 if (!value->IsNumber() && !value->IsUndefined()) { |
| 12125 bool has_exception; | 12125 bool has_exception; |
| 12126 Handle<Object> number = Execution::ToNumber(value, &has_exception); | 12126 Handle<Object> number = |
| 12127 Execution::ToNumber(object->GetIsolate(), value, &has_exception); |
| 12127 if (has_exception) return Handle<Object>(); | 12128 if (has_exception) return Handle<Object>(); |
| 12128 value = number; | 12129 value = number; |
| 12129 } | 12130 } |
| 12130 } | 12131 } |
| 12131 CALL_HEAP_FUNCTION( | 12132 CALL_HEAP_FUNCTION( |
| 12132 object->GetIsolate(), | 12133 object->GetIsolate(), |
| 12133 object->SetElement(index, *value, attr, strict_mode, true, set_mode), | 12134 object->SetElement(index, *value, attr, strict_mode, true, set_mode), |
| 12134 Object); | 12135 Object); |
| 12135 } | 12136 } |
| 12136 | 12137 |
| (...skipping 3831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15968 #define ERROR_MESSAGES_TEXTS(C, T) T, | 15969 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 15969 static const char* error_messages_[] = { | 15970 static const char* error_messages_[] = { |
| 15970 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 15971 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 15971 }; | 15972 }; |
| 15972 #undef ERROR_MESSAGES_TEXTS | 15973 #undef ERROR_MESSAGES_TEXTS |
| 15973 return error_messages_[reason]; | 15974 return error_messages_[reason]; |
| 15974 } | 15975 } |
| 15975 | 15976 |
| 15976 | 15977 |
| 15977 } } // namespace v8::internal | 15978 } } // namespace v8::internal |
| OLD | NEW |