From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/runtime/JSDataView.h | 32 +++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'Source/JavaScriptCore/runtime/JSDataView.h') diff --git a/Source/JavaScriptCore/runtime/JSDataView.h b/Source/JavaScriptCore/runtime/JSDataView.h index 950d1d678..f42032e9c 100644 --- a/Source/JavaScriptCore/runtime/JSDataView.h +++ b/Source/JavaScriptCore/runtime/JSDataView.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef JSDataView_h -#define JSDataView_h +#pragma once #include "DataView.h" #include "JSArrayBufferView.h" @@ -40,27 +39,39 @@ protected: JSDataView(VM&, ConstructionContext&, ArrayBuffer*); public: - static JSDataView* create( - ExecState*, Structure*, PassRefPtr, unsigned byteOffset, + JS_EXPORT_PRIVATE static JSDataView* create( + ExecState*, Structure*, RefPtr&&, unsigned byteOffset, unsigned byteLength); // Dummy methods, which don't actually work; these are just in place to // placate some template specialization we do elsewhere. static JSDataView* createUninitialized(ExecState*, Structure*, unsigned length); static JSDataView* create(ExecState*, Structure*, unsigned length); - bool set(ExecState*, JSObject*, unsigned offset, unsigned length); + bool set(ExecState*, unsigned, JSObject*, unsigned, unsigned length); + bool setIndex(ExecState*, unsigned, JSValue); - ArrayBuffer* buffer() const { return m_buffer; } + ArrayBuffer* possiblySharedBuffer() const { return m_buffer; } + ArrayBuffer* unsharedBuffer() const + { + RELEASE_ASSERT(!m_buffer->isShared()); + return m_buffer; + } - PassRefPtr typedImpl(); + RefPtr possiblySharedTypedImpl(); + RefPtr unsharedTypedImpl(); static const TypedArrayType TypedArrayStorageType = TypeDataView; protected: static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); + static bool put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); + static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool shouldThrow); + static bool deleteProperty(JSCell*, ExecState*, PropertyName); + + static void getOwnNonIndexPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode); static ArrayBuffer* slowDownAndWasteMemory(JSArrayBufferView*); - static PassRefPtr getTypedArrayImpl(JSArrayBufferView*); + static RefPtr getTypedArrayImpl(JSArrayBufferView*); public: static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); @@ -72,6 +83,3 @@ private: }; } // namespace JSC - -#endif // JSDataView_h - -- cgit v1.2.1