| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index 218d3b9625880164cc77add838d537432871f628..2645cca9add4191ceac9a7b36d7ec375b758018e 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -116,6 +116,15 @@ Handle<FixedArrayBase> Factory::NewFixedDoubleArrayWithHoles(
|
| }
|
|
|
|
|
| +Handle<WeakFixedArray> Factory::NewWeakFixedArray(int size) {
|
| + DCHECK(0 <= size);
|
| + size += WeakFixedArray::kReservedFieldCount;
|
| + CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateFixedArrayWithFiller(
|
| + size, NOT_TENURED, Smi::FromInt(0)),
|
| + WeakFixedArray);
|
| +}
|
| +
|
| +
|
| Handle<ConstantPoolArray> Factory::NewConstantPoolArray(
|
| const ConstantPoolArray::NumberOfEntries& small) {
|
| DCHECK(small.total_count() > 0);
|
| @@ -1877,7 +1886,7 @@ Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler,
|
| // TODO(rossberg): Once we optimize proxies, think about a scheme to share
|
| // maps. Will probably depend on the identity of the handler object, too.
|
| Handle<Map> map = NewMap(JS_PROXY_TYPE, JSProxy::kSize);
|
| - map->set_prototype(*prototype);
|
| + map->SetPrototype(prototype);
|
|
|
| // Allocate the proxy object.
|
| Handle<JSProxy> result = New<JSProxy>(map, NEW_SPACE);
|
| @@ -1896,7 +1905,7 @@ Handle<JSProxy> Factory::NewJSFunctionProxy(Handle<Object> handler,
|
| // TODO(rossberg): Once we optimize proxies, think about a scheme to share
|
| // maps. Will probably depend on the identity of the handler object, too.
|
| Handle<Map> map = NewMap(JS_FUNCTION_PROXY_TYPE, JSFunctionProxy::kSize);
|
| - map->set_prototype(*prototype);
|
| + map->SetPrototype(prototype);
|
|
|
| // Allocate the proxy object.
|
| Handle<JSFunctionProxy> result = New<JSFunctionProxy>(map, NEW_SPACE);
|
| @@ -1921,7 +1930,7 @@ void Factory::ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type,
|
| int size_difference = proxy->map()->instance_size() - map->instance_size();
|
| DCHECK(size_difference >= 0);
|
|
|
| - map->set_prototype(proxy->map()->prototype());
|
| + map->SetPrototype(handle(proxy->map()->prototype(), proxy->GetIsolate()));
|
|
|
| // Allocate the backing storage for the properties.
|
| int prop_size = map->InitialPropertiesLength();
|
|
|