Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index c5241ecac5ce72f74214fc9f3209cd7473ffe66e..5dd392f8a597684fd742ee909d7f4d314f16280a 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5936,20 +5936,7 @@ void v8::ArrayBuffer::Neuter() { |
"Only externalized ArrayBuffers can be neutered"); |
LOG_API(obj->GetIsolate(), "v8::ArrayBuffer::Neuter()"); |
ENTER_V8(isolate); |
- |
- for (i::Handle<i::Object> view_obj(obj->weak_first_view(), isolate); |
- !view_obj->IsUndefined();) { |
- i::Handle<i::JSArrayBufferView> view(i::JSArrayBufferView::cast(*view_obj)); |
- if (view->IsJSTypedArray()) { |
- i::JSTypedArray::cast(*view)->Neuter(); |
- } else if (view->IsJSDataView()) { |
- i::JSDataView::cast(*view)->Neuter(); |
- } else { |
- UNREACHABLE(); |
- } |
- view_obj = i::handle(view->weak_next(), isolate); |
- } |
- obj->Neuter(); |
+ i::Runtime::NeuterArrayBuffer(obj); |
} |