Revision: 14887
Author: [email protected]
Date: Wed May 29 08:38:09 2013
Log: Handlify map allocation in Genesis::InstallInternalArray.
[email protected]
TEST=mozilla/js1_5/Regress/regress-367561-01
Review URL: https://codereview.chromium.org/15690018
http://code.google.com/p/v8/source/detail?r=14887
Modified:
/branches/bleeding_edge/src/bootstrapper.cc
=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Thu May 23 03:01:42 2013
+++ /branches/bleeding_edge/src/bootstrapper.cc Wed May 29 08:38:09 2013
@@ -1611,14 +1611,12 @@
array_function->shared()->DontAdaptArguments();
- MaybeObject* maybe_map = array_function->initial_map()->Copy();
- Map* new_map;
- if (!maybe_map->To(&new_map)) return Handle<JSFunction>::null();
- new_map->set_elements_kind(elements_kind);
- array_function->set_initial_map(new_map);
+ Handle<Map> original_map(array_function->initial_map());
+ Handle<Map> initial_map = factory()->CopyMap(original_map);
+ initial_map->set_elements_kind(elements_kind);
+ array_function->set_initial_map(*initial_map);
// Make "length" magic on instances.
- Handle<Map> initial_map(array_function->initial_map());
Handle<DescriptorArray> array_descriptors(
factory()->NewDescriptorArray(0, 1));
DescriptorArray::WhitenessWitness witness(*array_descriptors);
@@ -1872,14 +1870,11 @@
{
Handle<JSFunction> array_function =
InstallInternalArray(builtins, "InternalArray",
FAST_HOLEY_ELEMENTS);
- if (array_function.is_null()) return false;
native_context()->set_internal_array_function(*array_function);
}
{
- Handle<JSFunction> array_function =
- InstallInternalArray(builtins, "InternalPackedArray",
FAST_ELEMENTS);
- if (array_function.is_null()) return false;
+ InstallInternalArray(builtins, "InternalPackedArray", FAST_ELEMENTS);
}
if (FLAG_disable_native_files) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.