| Index: src/accessors.cc
|
| diff --git a/src/accessors.cc b/src/accessors.cc
|
| index df981dc151a2362ed071f8be673efdf5d7189efb..ba977bc8dd989efa0256e42d60edcad085616132 100644
|
| --- a/src/accessors.cc
|
| +++ b/src/accessors.cc
|
| @@ -93,6 +93,39 @@ bool Accessors::IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name,
|
| }
|
|
|
|
|
| +bool Accessors::IsJSArrayBufferViewFieldAccessor(Handle<Map> map,
|
| + Handle<Name> name,
|
| + int* object_offset) {
|
| + Isolate* isolate = name->GetIsolate();
|
| +
|
| + switch (map->instance_type()) {
|
| + case JS_TYPED_ARRAY_TYPE:
|
| + // %TypedArray%.prototype is non-configurable, and so are the following
|
| + // named properties on %TypedArray%.prototype, so we can directly inline
|
| + // the field-load for typed array maps that still use their
|
| + // %TypedArray%.prototype.
|
| + if (JSFunction::cast(map->GetConstructor())->prototype() !=
|
| + map->prototype()) {
|
| + return false;
|
| + }
|
| + return CheckForName(name, isolate->factory()->length_string(),
|
| + JSTypedArray::kLengthOffset, object_offset) ||
|
| + CheckForName(name, isolate->factory()->byte_length_string(),
|
| + JSTypedArray::kByteLengthOffset, object_offset) ||
|
| + CheckForName(name, isolate->factory()->byte_offset_string(),
|
| + JSTypedArray::kByteOffsetOffset, object_offset);
|
| +
|
| + case JS_DATA_VIEW_TYPE:
|
| + return CheckForName(name, isolate->factory()->byte_length_string(),
|
| + JSDataView::kByteLengthOffset, object_offset) ||
|
| + CheckForName(name, isolate->factory()->byte_offset_string(),
|
| + JSDataView::kByteOffsetOffset, object_offset);
|
| + default:
|
| + return false;
|
| + }
|
| +}
|
| +
|
| +
|
| bool SetPropertyOnInstanceIfInherited(
|
| Isolate* isolate, const v8::PropertyCallbackInfo<void>& info,
|
| v8::Local<v8::Name> name, Handle<Object> value) {
|
|
|