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

Side by Side Diff: src/elements.cc

Issue 1196533004: Remove duplicate isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | 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 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 } 1329 }
1330 } 1330 }
1331 1331
1332 // Update the number of elements. 1332 // Update the number of elements.
1333 dict->ElementsRemoved(removed_entries); 1333 dict->ElementsRemoved(removed_entries);
1334 } 1334 }
1335 1335
1336 if (length <= Smi::kMaxValue) { 1336 if (length <= Smi::kMaxValue) {
1337 array->set_length(Smi::FromInt(length)); 1337 array->set_length(Smi::FromInt(length));
1338 } else { 1338 } else {
1339 Isolate* isolate = array->GetIsolate();
1340 Handle<Object> length_obj = isolate->factory()->NewNumberFromUint(length); 1339 Handle<Object> length_obj = isolate->factory()->NewNumberFromUint(length);
1341 array->set_length(*length_obj); 1340 array->set_length(*length_obj);
1342 } 1341 }
1343 } 1342 }
1344 1343
1345 static void DeleteCommon(Handle<JSObject> obj, uint32_t key, 1344 static void DeleteCommon(Handle<JSObject> obj, uint32_t key,
1346 LanguageMode language_mode) { 1345 LanguageMode language_mode) {
1347 Isolate* isolate = obj->GetIsolate(); 1346 Isolate* isolate = obj->GetIsolate();
1348 Handle<FixedArray> backing_store(FixedArray::cast(obj->elements()), 1347 Handle<FixedArray> backing_store(FixedArray::cast(obj->elements()),
1349 isolate); 1348 isolate);
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 break; 1787 break;
1789 } 1788 }
1790 1789
1791 array->set_elements(*elms); 1790 array->set_elements(*elms);
1792 array->set_length(Smi::FromInt(number_of_elements)); 1791 array->set_length(Smi::FromInt(number_of_elements));
1793 return array; 1792 return array;
1794 } 1793 }
1795 1794
1796 } // namespace internal 1795 } // namespace internal
1797 } // namespace v8 1796 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698