Index: src/accessors.cc |
diff --git a/src/accessors.cc b/src/accessors.cc |
index f220b829bf9dc0226e75bdfaa74bed46534520e4..5ef8bf15f7e0d00e2724ed0d65748e19a9af2395 100644 |
--- a/src/accessors.cc |
+++ b/src/accessors.cc |
@@ -78,26 +78,6 @@ |
return |
CheckForName(name, isolate->factory()->length_string(), |
JSArray::kLengthOffset, object_offset); |
- case JS_ARRAY_BUFFER_TYPE: |
- return CheckForName(name, isolate->factory()->byte_length_string(), |
- JSArrayBuffer::kByteLengthOffset, object_offset); |
- default: |
- if (map->instance_type() < FIRST_NONSTRING_TYPE) { |
- return CheckForName(name, isolate->factory()->length_string(), |
- String::kLengthOffset, object_offset); |
- } |
- |
- return false; |
- } |
-} |
- |
- |
-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 |
@@ -107,19 +87,29 @@ |
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); |
- |
+ 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_ARRAY_BUFFER_TYPE: |
+ return |
+ CheckForName(name, isolate->factory()->byte_length_string(), |
+ JSArrayBuffer::kByteLengthOffset, 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); |
+ return |
+ CheckForName(name, isolate->factory()->byte_length_string(), |
+ JSDataView::kByteLengthOffset, object_offset) || |
+ CheckForName(name, isolate->factory()->byte_offset_string(), |
+ JSDataView::kByteOffsetOffset, object_offset); |
default: |
+ if (map->instance_type() < FIRST_NONSTRING_TYPE) { |
+ return CheckForName(name, isolate->factory()->length_string(), |
+ String::kLengthOffset, object_offset); |
+ } |
+ |
return false; |
} |
} |