@@ -1267,20 +1267,6 @@ void GetZeroFillToggle(const FunctionCallbackInfo<Value>& args) { |
1267 | 1267 | args.GetReturnValue().Set(Uint32Array::New(ab, 0, 1)); |
1268 | 1268 | } |
1269 | 1269 |
|
1270 | | -void DetachArrayBuffer(const FunctionCallbackInfo<Value>& args) { |
1271 | | - Environment* env = Environment::GetCurrent(args); |
1272 | | - if (args[0]->IsArrayBuffer()) { |
1273 | | - Local<ArrayBuffer> buf = args[0].As<ArrayBuffer>(); |
1274 | | - if (buf->IsDetachable()) { |
1275 | | - std::shared_ptr<BackingStore> store = buf->GetBackingStore(); |
1276 | | - if (buf->Detach(Local<Value>()).IsNothing()) { |
1277 | | - return; |
1278 | | - } |
1279 | | - args.GetReturnValue().Set(ArrayBuffer::New(env->isolate(), store)); |
1280 | | - } |
1281 | | - } |
1282 | | -} |
1283 | | - |
1284 | 1270 | static void Btoa(const FunctionCallbackInfo<Value>& args) { |
1285 | 1271 | CHECK_EQ(args.Length(), 1); |
1286 | 1272 | Environment* env = Environment::GetCurrent(args); |
@@ -1570,7 +1556,6 @@ void Initialize(Local<Object> target, |
1570 | 1556 | &fast_index_of_number); |
1571 | 1557 | SetMethodNoSideEffect(context, target, "indexOfString", IndexOfString); |
1572 | 1558 |
|
1573 | | - SetMethod(context, target, "detachArrayBuffer", DetachArrayBuffer); |
1574 | 1559 | SetMethod(context, target, "copyArrayBuffer", CopyArrayBuffer); |
1575 | 1560 |
|
1576 | 1561 | SetMethod(context, target, "swap16", Swap16); |
@@ -1680,7 +1665,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { |
1680 | 1665 | registry->Register(StringWrite<UTF8>); |
1681 | 1666 | registry->Register(GetZeroFillToggle); |
1682 | 1667 |
|
1683 | | - registry->Register(DetachArrayBuffer); |
1684 | 1668 | registry->Register(CopyArrayBuffer); |
1685 | 1669 |
|
1686 | 1670 | registry->Register(Atob); |
|