@@ -1261,20 +1261,6 @@ void GetZeroFillToggle(const FunctionCallbackInfo<Value>& args) {
12611261 args.GetReturnValue ().Set (Uint32Array::New (ab, 0 , 1 ));
12621262}
12631263
1264- void DetachArrayBuffer (const FunctionCallbackInfo<Value>& args) {
1265- Environment* env = Environment::GetCurrent (args);
1266- if (args[0 ]->IsArrayBuffer ()) {
1267- Local<ArrayBuffer> buf = args[0 ].As <ArrayBuffer>();
1268- if (buf->IsDetachable ()) {
1269- std::shared_ptr<BackingStore> store = buf->GetBackingStore ();
1270- if (buf->Detach (Local<Value>()).IsNothing ()) {
1271- return ;
1272- }
1273- args.GetReturnValue ().Set (ArrayBuffer::New (env->isolate (), store));
1274- }
1275- }
1276- }
1277-
12781264static void Btoa (const FunctionCallbackInfo<Value>& args) {
12791265 CHECK_EQ (args.Length (), 1 );
12801266 Environment* env = Environment::GetCurrent (args);
@@ -1564,7 +1550,6 @@ void Initialize(Local<Object> target,
15641550 &fast_index_of_number);
15651551 SetMethodNoSideEffect (context, target, " indexOfString" , IndexOfString);
15661552
1567- SetMethod (context, target, " detachArrayBuffer" , DetachArrayBuffer);
15681553 SetMethod (context, target, " copyArrayBuffer" , CopyArrayBuffer);
15691554
15701555 SetMethod (context, target, " swap16" , Swap16);
@@ -1674,7 +1659,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
16741659 registry->Register (StringWrite<UTF8>);
16751660 registry->Register (GetZeroFillToggle);
16761661
1677- registry->Register (DetachArrayBuffer);
16781662 registry->Register (CopyArrayBuffer);
16791663
16801664 registry->Register (Atob);
0 commit comments