From 39f64bcf6300444703c31b13e87618863b8048f6 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Sun, 24 Jan 2016 23:41:39 -0800 Subject: [PATCH] Bug 1079844 - Rename JS_ARRAYBUFFER_NEUTERED_FLAG to use detachment terminology. r=sfink --- js/src/builtin/TypedArray.js | 2 +- js/src/builtin/TypedObjectConstants.h | 2 +- js/src/vm/ArrayBufferObject.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/builtin/TypedArray.js b/js/src/builtin/TypedArray.js index eafc2fac452..2ba8ed786df 100644 --- a/js/src/builtin/TypedArray.js +++ b/js/src/builtin/TypedArray.js @@ -32,7 +32,7 @@ function IsDetachedBuffer(buffer) { return false; var flags = UnsafeGetInt32FromReservedSlot(buffer, JS_ARRAYBUFFER_FLAGS_SLOT); - return (flags & JS_ARRAYBUFFER_NEUTERED_FLAG) !== 0; + return (flags & JS_ARRAYBUFFER_DETACHED_FLAG) !== 0; } function GetAttachedArrayBuffer(tarray) { diff --git a/js/src/builtin/TypedObjectConstants.h b/js/src/builtin/TypedObjectConstants.h index 3294938c5c9..e1b6a0d029c 100644 --- a/js/src/builtin/TypedObjectConstants.h +++ b/js/src/builtin/TypedObjectConstants.h @@ -28,7 +28,7 @@ #define JS_ARRAYBUFFER_FLAGS_SLOT 3 -#define JS_ARRAYBUFFER_NEUTERED_FLAG 0x4 +#define JS_ARRAYBUFFER_DETACHED_FLAG 0x4 /////////////////////////////////////////////////////////////////////////// // Slots for typed prototypes diff --git a/js/src/vm/ArrayBufferObject.h b/js/src/vm/ArrayBufferObject.h index e3d72b53aa2..31fa757cb45 100644 --- a/js/src/vm/ArrayBufferObject.h +++ b/js/src/vm/ArrayBufferObject.h @@ -159,7 +159,7 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared TYPED_OBJECT_VIEWS = 0x20 }; - static_assert(JS_ARRAYBUFFER_NEUTERED_FLAG == DETACHED, + static_assert(JS_ARRAYBUFFER_DETACHED_FLAG == DETACHED, "self-hosted code with burned-in constants must use the " "correct DETACHED bit value"); public: