Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: src/objects.cc

Issue 221233002: Merged r20300 into 3.25 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.25
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12392 matching lines...) Expand 10 before | Expand all | Expand 10 after
12403 12403
12404 Handle<Object> JSObject::SetElement(Handle<JSObject> object, 12404 Handle<Object> JSObject::SetElement(Handle<JSObject> object,
12405 uint32_t index, 12405 uint32_t index,
12406 Handle<Object> value, 12406 Handle<Object> value,
12407 PropertyAttributes attributes, 12407 PropertyAttributes attributes,
12408 StrictMode strict_mode, 12408 StrictMode strict_mode,
12409 bool check_prototype, 12409 bool check_prototype,
12410 SetPropertyMode set_mode) { 12410 SetPropertyMode set_mode) {
12411 Isolate* isolate = object->GetIsolate(); 12411 Isolate* isolate = object->GetIsolate();
12412 12412
12413 if (object->HasExternalArrayElements()) { 12413 if (object->HasExternalArrayElements() ||
12414 object->HasFixedTypedArrayElements()) {
12414 if (!value->IsNumber() && !value->IsUndefined()) { 12415 if (!value->IsNumber() && !value->IsUndefined()) {
12415 bool has_exception; 12416 bool has_exception;
12416 Handle<Object> number = 12417 Handle<Object> number =
12417 Execution::ToNumber(isolate, value, &has_exception); 12418 Execution::ToNumber(isolate, value, &has_exception);
12418 if (has_exception) return Handle<Object>(); 12419 if (has_exception) return Handle<Object>();
12419 value = number; 12420 value = number;
12420 } 12421 }
12421 } 12422 }
12422 12423
12423 // Check access rights if needed. 12424 // Check access rights if needed.
(...skipping 4008 matching lines...) Expand 10 before | Expand all | Expand 10 after
16432 #define ERROR_MESSAGES_TEXTS(C, T) T, 16433 #define ERROR_MESSAGES_TEXTS(C, T) T,
16433 static const char* error_messages_[] = { 16434 static const char* error_messages_[] = {
16434 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16435 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16435 }; 16436 };
16436 #undef ERROR_MESSAGES_TEXTS 16437 #undef ERROR_MESSAGES_TEXTS
16437 return error_messages_[reason]; 16438 return error_messages_[reason];
16438 } 16439 }
16439 16440
16440 16441
16441 } } // namespace v8::internal 16442 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698