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

Side by Side Diff: src/elements.cc

Issue 1126043004: Migrate error messages, part 10. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed and rebased Created 5 years, 7 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
« no previous file with comments | « src/debug.cc ('k') | src/factory.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/elements.h" 9 #include "src/elements.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 Handle<SeededNumberDictionary> dictionary = 1402 Handle<SeededNumberDictionary> dictionary =
1403 Handle<SeededNumberDictionary>::cast(backing_store); 1403 Handle<SeededNumberDictionary>::cast(backing_store);
1404 int entry = dictionary->FindEntry(key); 1404 int entry = dictionary->FindEntry(key);
1405 if (entry != SeededNumberDictionary::kNotFound) { 1405 if (entry != SeededNumberDictionary::kNotFound) {
1406 Handle<Object> result = 1406 Handle<Object> result =
1407 SeededNumberDictionary::DeleteProperty(dictionary, entry); 1407 SeededNumberDictionary::DeleteProperty(dictionary, entry);
1408 if (*result == *isolate->factory()->false_value()) { 1408 if (*result == *isolate->factory()->false_value()) {
1409 if (is_strict(language_mode)) { 1409 if (is_strict(language_mode)) {
1410 // Deleting a non-configurable property in strict mode. 1410 // Deleting a non-configurable property in strict mode.
1411 Handle<Object> name = isolate->factory()->NewNumberFromUint(key); 1411 Handle<Object> name = isolate->factory()->NewNumberFromUint(key);
1412 Handle<Object> args[2] = { name, obj }; 1412 THROW_NEW_ERROR(
1413 THROW_NEW_ERROR(isolate, NewTypeError("strict_delete_property", 1413 isolate,
1414 HandleVector(args, 2)), 1414 NewTypeError(MessageTemplate::kStrictDeleteProperty, name, obj),
1415 Object); 1415 Object);
1416 } 1416 }
1417 return isolate->factory()->false_value(); 1417 return isolate->factory()->false_value();
1418 } 1418 }
1419 Handle<FixedArray> new_elements = 1419 Handle<FixedArray> new_elements =
1420 SeededNumberDictionary::Shrink(dictionary, key); 1420 SeededNumberDictionary::Shrink(dictionary, key);
1421 1421
1422 if (is_arguments) { 1422 if (is_arguments) {
1423 FixedArray::cast(obj->elements())->set(1, *new_elements); 1423 FixedArray::cast(obj->elements())->set(1, *new_elements);
1424 } else { 1424 } else {
1425 obj->set_elements(*new_elements); 1425 obj->set_elements(*new_elements);
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 UNREACHABLE(); 1851 UNREACHABLE();
1852 break; 1852 break;
1853 } 1853 }
1854 1854
1855 array->set_elements(*elms); 1855 array->set_elements(*elms);
1856 array->set_length(Smi::FromInt(number_of_elements)); 1856 array->set_length(Smi::FromInt(number_of_elements));
1857 return array; 1857 return array;
1858 } 1858 }
1859 1859
1860 } } // namespace v8::internal 1860 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698