| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index becc51380f90da75fbaf1e086f0082826b049d97..34f54833746baa3f3cd2a5fa0d18bb4be0d94176 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -1417,7 +1417,7 @@ static Local<ObjectTemplate> ObjectTemplateNew(
|
| obj->set_serial_number(i::Smi::FromInt(next_serial_number));
|
| if (!constructor.IsEmpty())
|
| obj->set_constructor(*Utils::OpenHandle(*constructor));
|
| - obj->set_internal_field_count(i::Smi::FromInt(0));
|
| + obj->set_data(i::Smi::FromInt(0));
|
| return Utils::ToLocal(obj);
|
| }
|
|
|
| @@ -1712,7 +1712,7 @@ void ObjectTemplate::SetCallAsFunctionHandler(FunctionCallback callback,
|
|
|
|
|
| int ObjectTemplate::InternalFieldCount() {
|
| - return i::Smi::cast(Utils::OpenHandle(this)->internal_field_count())->value();
|
| + return Utils::OpenHandle(this)->internal_field_count();
|
| }
|
|
|
|
|
| @@ -1730,9 +1730,18 @@ void ObjectTemplate::SetInternalFieldCount(int value) {
|
| // function to do the setting.
|
| EnsureConstructor(isolate, this);
|
| }
|
| - Utils::OpenHandle(this)->set_internal_field_count(i::Smi::FromInt(value));
|
| + Utils::OpenHandle(this)->set_internal_field_count(value);
|
| }
|
|
|
| +bool ObjectTemplate::ImmutableProto() {
|
| + return Utils::OpenHandle(this)->immutable_proto();
|
| +}
|
| +
|
| +void ObjectTemplate::SetImmutableProto() {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ENTER_V8(isolate);
|
| + Utils::OpenHandle(this)->set_immutable_proto(true);
|
| +}
|
|
|
| // --- S c r i p t s ---
|
|
|
|
|