Commit 0e0d9312 authored by fpizlo@apple.com's avatar fpizlo@apple.com

Typed arrays should be rewritten

https://bugs.webkit.org/show_bug.cgi?id=119064

.: 

Reviewed by Oliver Hunt.

Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.

* Source/autotools/symbols.filter:

Source/JavaScriptCore: 

Reviewed by Oliver Hunt.
        
Typed arrays were previously deficient in several major ways:
        
- They were defined separately in WebCore and in the jsc shell. The two
  implementations were different, and the jsc shell one was basically wrong.
  The WebCore one was quite awful, also.
        
- Typed arrays were not visible to the JIT except through some weird hooks.
  For example, the JIT could not ask "what is the Structure that this typed
  array would have if I just allocated it from this global object". Also,
  it was difficult to wire any of the typed array intrinsics, because most
  of the functionality wasn't visible anywhere in JSC.
        
- Typed array allocation was brain-dead. Allocating a typed array involved
  two JS objects, two GC weak handles, and three malloc allocations.
        
- Neutering. It involved keeping tabs on all native views but not the view
  wrappers, even though the native views can autoneuter just by asking the
  buffer if it was neutered anytime you touch them; while the JS view
  wrappers are the ones that you really want to reach out to.
        
- Common case-ing. Most typed arrays have one buffer and one view, and
  usually nobody touches the buffer. Yet we created all of that stuff
  anyway, using data structures optimized for the case where you had a lot
  of views.
        
- Semantic goofs. Typed arrays should, in the future, behave like ES
  features rather than DOM features, for example when it comes to exceptions.
  Firefox already does this and I agree with them.
        
This patch cleanses our codebase of these sins:
        
- Typed arrays are almost entirely defined in JSC. Only the lifecycle
  management of native references to buffers is left to WebCore.
        
- Allocating a typed array requires either two GC allocations (a cell and a
  copied storage vector) or one GC allocation, a malloc allocation, and a
  weak handle (a cell and a malloc'd storage vector, plus a finalizer for the
  latter). The latter is only used for oversize arrays. Remember that before
  it was 7 allocations no matter what.
        
- Typed arrays require just 4 words of overhead: Structure*, Butterfly*,
  mode/length, void* vector. Before it was a lot more than that - remember,
  there were five additional objects that did absolutely nothing for anybody.
        
- Native views aren't tracked by the buffer, or by the wrappers. They are
  transient. In the future we'll probably switch to not even having them be
  malloc'd.
        
- Native array buffers have an efficient way of tracking all of their JS view
  wrappers, both for neutering, and for lifecycle management. The GC
  special-cases native array buffers. This saves a bunch of grief; for example
  it means that a JS view wrapper can refer to its buffer via the butterfly,
  which would be dead by the time we went to finalize.
        
- Typed array semantics now match Firefox, which also happens to be where the
  standards are going. The discussion on webkit-dev seemed to confirm that
  Chrome is also heading in this direction. This includes making
  Uint8ClampedArray not a subtype of Uint8Array, and getting rid of
  ArrayBufferView as a JS-visible construct.
        
This is up to a 10x speed-up on programs that allocate a lot of typed arrays.
It's a 1% speed-up on Octane. It also opens up a bunch of possibilities for
further typed array optimizations in the JSC JITs, including inlining typed
array allocation, inlining more of the accessors, reducing the cost of type
checks, etc.
        
An additional property of this patch is that typed arrays are mostly
implemented using templates. This deduplicates a bunch of code, but does mean
that we need some hacks for exporting s_info's of template classes. See
JSGenericTypedArrayView.h and JSTypedArrays.cpp. Those hacks are fairly
low-impact compared to code duplication.
        
Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* JSCTypedArrayStubs.h: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/ByValInfo.h:
(JSC::hasOptimizableIndexingForClassInfo):
(JSC::jitArrayModeForClassInfo):
(JSC::typedArrayTypeForJITArrayMode):
* bytecode/SpeculatedType.cpp:
(JSC::speculationFromClassInfo):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::toTypedArrayType):
* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::typedArrayType):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* heap/CopyToken.h:
* heap/DeferGC.h:
(JSC::DeferGCForAWhile::DeferGCForAWhile):
(JSC::DeferGCForAWhile::~DeferGCForAWhile):
* heap/GCIncomingRefCounted.h: Added.
(JSC::GCIncomingRefCounted::GCIncomingRefCounted):
(JSC::GCIncomingRefCounted::~GCIncomingRefCounted):
(JSC::GCIncomingRefCounted::numberOfIncomingReferences):
(JSC::GCIncomingRefCounted::incomingReferenceAt):
(JSC::GCIncomingRefCounted::singletonFlag):
(JSC::GCIncomingRefCounted::hasVectorOfCells):
(JSC::GCIncomingRefCounted::hasAnyIncoming):
(JSC::GCIncomingRefCounted::hasSingleton):
(JSC::GCIncomingRefCounted::singleton):
(JSC::GCIncomingRefCounted::vectorOfCells):
* heap/GCIncomingRefCountedInlines.h: Added.
(JSC::::addIncomingReference):
(JSC::::filterIncomingReferences):
* heap/GCIncomingRefCountedSet.h: Added.
(JSC::GCIncomingRefCountedSet::size):
* heap/GCIncomingRefCountedSetInlines.h: Added.
(JSC::::GCIncomingRefCountedSet):
(JSC::::~GCIncomingRefCountedSet):
(JSC::::addReference):
(JSC::::sweep):
(JSC::::removeAll):
(JSC::::removeDead):
* heap/Heap.cpp:
(JSC::Heap::addReference):
(JSC::Heap::extraSize):
(JSC::Heap::size):
(JSC::Heap::capacity):
(JSC::Heap::collect):
(JSC::Heap::decrementDeferralDepth):
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
* heap/Heap.h:
* interpreter/CallFrame.h:
(JSC::ExecState::dataViewTable):
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jsc.cpp:
(GlobalObject::finishCreation):
* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::transfer):
* runtime/ArrayBuffer.h:
(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::ArrayBuffer):
(JSC::ArrayBuffer::gcSizeEstimateInBytes):
(JSC::ArrayBuffer::pin):
(JSC::ArrayBuffer::unpin):
(JSC::ArrayBufferContents::tryAllocate):
* runtime/ArrayBufferView.cpp:
(JSC::ArrayBufferView::ArrayBufferView):
(JSC::ArrayBufferView::~ArrayBufferView):
(JSC::ArrayBufferView::setNeuterable):
* runtime/ArrayBufferView.h:
(JSC::ArrayBufferView::isNeutered):
(JSC::ArrayBufferView::buffer):
(JSC::ArrayBufferView::baseAddress):
(JSC::ArrayBufferView::byteOffset):
(JSC::ArrayBufferView::verifySubRange):
(JSC::ArrayBufferView::clampOffsetAndNumElements):
(JSC::ArrayBufferView::calculateOffsetAndLength):
* runtime/ClassInfo.h:
* runtime/CommonIdentifiers.h:
* runtime/DataView.cpp: Added.
(JSC::DataView::DataView):
(JSC::DataView::create):
(JSC::DataView::wrap):
* runtime/DataView.h: Added.
(JSC::DataView::byteLength):
(JSC::DataView::getType):
(JSC::DataView::get):
(JSC::DataView::set):
* runtime/Float32Array.h:
* runtime/Float64Array.h:
* runtime/GenericTypedArrayView.h: Added.
(JSC::GenericTypedArrayView::data):
(JSC::GenericTypedArrayView::set):
(JSC::GenericTypedArrayView::setRange):
(JSC::GenericTypedArrayView::zeroRange):
(JSC::GenericTypedArrayView::zeroFill):
(JSC::GenericTypedArrayView::length):
(JSC::GenericTypedArrayView::byteLength):
(JSC::GenericTypedArrayView::item):
(JSC::GenericTypedArrayView::checkInboundData):
(JSC::GenericTypedArrayView::getType):
* runtime/GenericTypedArrayViewInlines.h: Added.
(JSC::::GenericTypedArrayView):
(JSC::::create):
(JSC::::createUninitialized):
(JSC::::subarray):
(JSC::::wrap):
* runtime/IndexingHeader.h:
(JSC::IndexingHeader::arrayBuffer):
(JSC::IndexingHeader::setArrayBuffer):
* runtime/Int16Array.h:
* runtime/Int32Array.h:
* runtime/Int8Array.h:
* runtime/JSArrayBuffer.cpp: Added.
(JSC::JSArrayBuffer::JSArrayBuffer):
(JSC::JSArrayBuffer::finishCreation):
(JSC::JSArrayBuffer::create):
(JSC::JSArrayBuffer::createStructure):
(JSC::JSArrayBuffer::getOwnPropertySlot):
(JSC::JSArrayBuffer::getOwnPropertyDescriptor):
(JSC::JSArrayBuffer::put):
(JSC::JSArrayBuffer::defineOwnProperty):
(JSC::JSArrayBuffer::deleteProperty):
(JSC::JSArrayBuffer::getOwnNonIndexPropertyNames):
* runtime/JSArrayBuffer.h: Added.
(JSC::JSArrayBuffer::impl):
(JSC::toArrayBuffer):
* runtime/JSArrayBufferConstructor.cpp: Added.
(JSC::JSArrayBufferConstructor::JSArrayBufferConstructor):
(JSC::JSArrayBufferConstructor::finishCreation):
(JSC::JSArrayBufferConstructor::create):
(JSC::JSArrayBufferConstructor::createStructure):
(JSC::constructArrayBuffer):
(JSC::JSArrayBufferConstructor::getConstructData):
(JSC::JSArrayBufferConstructor::getCallData):
* runtime/JSArrayBufferConstructor.h: Added.
* runtime/JSArrayBufferPrototype.cpp: Added.
(JSC::arrayBufferProtoFuncSlice):
(JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
(JSC::JSArrayBufferPrototype::finishCreation):
(JSC::JSArrayBufferPrototype::create):
(JSC::JSArrayBufferPrototype::createStructure):
* runtime/JSArrayBufferPrototype.h: Added.
* runtime/JSArrayBufferView.cpp: Added.
(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
(JSC::JSArrayBufferView::JSArrayBufferView):
(JSC::JSArrayBufferView::finishCreation):
(JSC::JSArrayBufferView::getOwnPropertySlot):
(JSC::JSArrayBufferView::getOwnPropertyDescriptor):
(JSC::JSArrayBufferView::put):
(JSC::JSArrayBufferView::defineOwnProperty):
(JSC::JSArrayBufferView::deleteProperty):
(JSC::JSArrayBufferView::getOwnNonIndexPropertyNames):
(JSC::JSArrayBufferView::finalize):
* runtime/JSArrayBufferView.h: Added.
(JSC::JSArrayBufferView::sizeOf):
(JSC::JSArrayBufferView::ConstructionContext::operator!):
(JSC::JSArrayBufferView::ConstructionContext::structure):
(JSC::JSArrayBufferView::ConstructionContext::vector):
(JSC::JSArrayBufferView::ConstructionContext::length):
(JSC::JSArrayBufferView::ConstructionContext::mode):
(JSC::JSArrayBufferView::ConstructionContext::butterfly):
(JSC::JSArrayBufferView::mode):
(JSC::JSArrayBufferView::vector):
(JSC::JSArrayBufferView::length):
(JSC::JSArrayBufferView::offsetOfVector):
(JSC::JSArrayBufferView::offsetOfLength):
(JSC::JSArrayBufferView::offsetOfMode):
* runtime/JSArrayBufferViewInlines.h: Added.
(JSC::JSArrayBufferView::slowDownAndWasteMemoryIfNecessary):
(JSC::JSArrayBufferView::buffer):
(JSC::JSArrayBufferView::impl):
(JSC::JSArrayBufferView::neuter):
(JSC::JSArrayBufferView::byteOffset):
* runtime/JSCell.cpp:
(JSC::JSCell::slowDownAndWasteMemory):
(JSC::JSCell::getTypedArrayImpl):
* runtime/JSCell.h:
* runtime/JSDataView.cpp: Added.
(JSC::JSDataView::JSDataView):
(JSC::JSDataView::create):
(JSC::JSDataView::createUninitialized):
(JSC::JSDataView::set):
(JSC::JSDataView::typedImpl):
(JSC::JSDataView::getOwnPropertySlot):
(JSC::JSDataView::getOwnPropertyDescriptor):
(JSC::JSDataView::slowDownAndWasteMemory):
(JSC::JSDataView::getTypedArrayImpl):
(JSC::JSDataView::createStructure):
* runtime/JSDataView.h: Added.
* runtime/JSDataViewPrototype.cpp: Added.
(JSC::JSDataViewPrototype::JSDataViewPrototype):
(JSC::JSDataViewPrototype::create):
(JSC::JSDataViewPrototype::createStructure):
(JSC::JSDataViewPrototype::getOwnPropertySlot):
(JSC::JSDataViewPrototype::getOwnPropertyDescriptor):
(JSC::getData):
(JSC::setData):
(JSC::dataViewProtoFuncGetInt8):
(JSC::dataViewProtoFuncGetInt16):
(JSC::dataViewProtoFuncGetInt32):
(JSC::dataViewProtoFuncGetUint8):
(JSC::dataViewProtoFuncGetUint16):
(JSC::dataViewProtoFuncGetUint32):
(JSC::dataViewProtoFuncGetFloat32):
(JSC::dataViewProtoFuncGetFloat64):
(JSC::dataViewProtoFuncSetInt8):
(JSC::dataViewProtoFuncSetInt16):
(JSC::dataViewProtoFuncSetInt32):
(JSC::dataViewProtoFuncSetUint8):
(JSC::dataViewProtoFuncSetUint16):
(JSC::dataViewProtoFuncSetUint32):
(JSC::dataViewProtoFuncSetFloat32):
(JSC::dataViewProtoFuncSetFloat64):
* runtime/JSDataViewPrototype.h: Added.
* runtime/JSFloat32Array.h: Added.
* runtime/JSFloat64Array.h: Added.
* runtime/JSGenericTypedArrayView.h: Added.
(JSC::JSGenericTypedArrayView::byteLength):
(JSC::JSGenericTypedArrayView::byteSize):
(JSC::JSGenericTypedArrayView::typedVector):
(JSC::JSGenericTypedArrayView::canGetIndexQuickly):
(JSC::JSGenericTypedArrayView::canSetIndexQuickly):
(JSC::JSGenericTypedArrayView::getIndexQuicklyAsNativeValue):
(JSC::JSGenericTypedArrayView::getIndexQuicklyAsDouble):
(JSC::JSGenericTypedArrayView::getIndexQuickly):
(JSC::JSGenericTypedArrayView::setIndexQuicklyToNativeValue):
(JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
(JSC::JSGenericTypedArrayView::setIndexQuickly):
(JSC::JSGenericTypedArrayView::canAccessRangeQuickly):
(JSC::JSGenericTypedArrayView::typedImpl):
(JSC::JSGenericTypedArrayView::createStructure):
(JSC::JSGenericTypedArrayView::info):
(JSC::toNativeTypedView):
* runtime/JSGenericTypedArrayViewConstructor.h: Added.
* runtime/JSGenericTypedArrayViewConstructorInlines.h: Added.
(JSC::::JSGenericTypedArrayViewConstructor):
(JSC::::finishCreation):
(JSC::::create):
(JSC::::createStructure):
(JSC::constructGenericTypedArrayView):
(JSC::::getConstructData):
(JSC::::getCallData):
* runtime/JSGenericTypedArrayViewInlines.h: Added.
(JSC::::JSGenericTypedArrayView):
(JSC::::create):
(JSC::::createUninitialized):
(JSC::::validateRange):
(JSC::::setWithSpecificType):
(JSC::::set):
(JSC::::getOwnPropertySlot):
(JSC::::getOwnPropertyDescriptor):
(JSC::::put):
(JSC::::defineOwnProperty):
(JSC::::deleteProperty):
(JSC::::getOwnPropertySlotByIndex):
(JSC::::putByIndex):
(JSC::::deletePropertyByIndex):
(JSC::::getOwnNonIndexPropertyNames):
(JSC::::getOwnPropertyNames):
(JSC::::visitChildren):
(JSC::::copyBackingStore):
(JSC::::slowDownAndWasteMemory):
(JSC::::getTypedArrayImpl):
* runtime/JSGenericTypedArrayViewPrototype.h: Added.
* runtime/JSGenericTypedArrayViewPrototypeInlines.h: Added.
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncSubarray):
(JSC::::JSGenericTypedArrayViewPrototype):
(JSC::::finishCreation):
(JSC::::create):
(JSC::::createStructure):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::arrayBufferPrototype):
(JSC::JSGlobalObject::arrayBufferStructure):
(JSC::JSGlobalObject::typedArrayStructure):
* runtime/JSInt16Array.h: Added.
* runtime/JSInt32Array.h: Added.
* runtime/JSInt8Array.h: Added.
* runtime/JSTypedArrayConstructors.cpp: Added.
* runtime/JSTypedArrayConstructors.h: Added.
* runtime/JSTypedArrayPrototypes.cpp: Added.
* runtime/JSTypedArrayPrototypes.h: Added.
* runtime/JSTypedArrays.cpp: Added.
* runtime/JSTypedArrays.h: Added.
* runtime/JSUint16Array.h: Added.
* runtime/JSUint32Array.h: Added.
* runtime/JSUint8Array.h: Added.
* runtime/JSUint8ClampedArray.h: Added.
* runtime/Operations.h:
* runtime/Options.h:
* runtime/SimpleTypedArrayController.cpp: Added.
(JSC::SimpleTypedArrayController::SimpleTypedArrayController):
(JSC::SimpleTypedArrayController::~SimpleTypedArrayController):
(JSC::SimpleTypedArrayController::toJS):
* runtime/SimpleTypedArrayController.h: Added.
* runtime/Structure.h:
(JSC::Structure::couldHaveIndexingHeader):
* runtime/StructureInlines.h:
(JSC::Structure::hasIndexingHeader):
* runtime/TypedArrayAdaptors.h: Added.
(JSC::IntegralTypedArrayAdaptor::toNative):
(JSC::IntegralTypedArrayAdaptor::toJSValue):
(JSC::IntegralTypedArrayAdaptor::toDouble):
(JSC::FloatTypedArrayAdaptor::toNative):
(JSC::FloatTypedArrayAdaptor::toJSValue):
(JSC::FloatTypedArrayAdaptor::toDouble):
(JSC::Uint8ClampedAdaptor::toNative):
(JSC::Uint8ClampedAdaptor::toJSValue):
(JSC::Uint8ClampedAdaptor::toDouble):
(JSC::Uint8ClampedAdaptor::clamp):
* runtime/TypedArrayController.cpp: Added.
(JSC::TypedArrayController::TypedArrayController):
(JSC::TypedArrayController::~TypedArrayController):
* runtime/TypedArrayController.h: Added.
* runtime/TypedArrayDescriptor.h: Removed.
* runtime/TypedArrayInlines.h: Added.
* runtime/TypedArrayType.cpp: Added.
(JSC::classInfoForType):
(WTF::printInternal):
* runtime/TypedArrayType.h: Added.
(JSC::toIndex):
(JSC::isTypedView):
(JSC::elementSize):
(JSC::isInt):
(JSC::isFloat):
(JSC::isSigned):
(JSC::isClamped):
* runtime/TypedArrays.h: Added.
* runtime/Uint16Array.h:
* runtime/Uint32Array.h:
* runtime/Uint8Array.h:
* runtime/Uint8ClampedArray.h:
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::~VM):
* runtime/VM.h:

Source/WebCore: 

Reviewed by Oliver Hunt.

Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
client of them. There is only one layering violation: WebCore installs a
WebCoreTypedArrayController on VM, which makes the
ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
alive but if ArrayBuffer is kept alive from native code then the
JSArrayByffer may die. WebCoreTypedArrayController will keep the
JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
        
To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
changed to make most references to wrappers refer to JSObject* rather than
JSDOMWrapper*.
        
Array buffer views are now transient; the JS array buffer view wrappers
don't own them or keep them alive. This required a bunch of changes to make
bindings code use RefPtr<ArrayBufferView> to hold onto their views.
        
Also there is a bunch of new code to make JSC-provided array buffers and
views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
        
Finally, the DataView API is now completely different: the JSDataView
provides the same user-visible JS API but using its own internal magic; the
C++ code that uses DataView now uses a rather different API that is not
aware of usual DOM semantics, since it's in JSC and not WebCore. It's
equally useful for all of WebCore's purposes, but some code had to change
to adapt the new conventions.
        
Some tests have been changed or rebased due to changes in behavior, that
bring us into conformance with where the standards are going and allow us to
match Firefox behavior.

Automake work and some additional GTK changes courtesy of
Zan Dobersek <zdobersek@igalia.com>.
        
Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.

* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/runtime/DataView.h: Added.
* ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
* ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
* ForwardingHeaders/runtime/JSDataView.h: Added.
* ForwardingHeaders/runtime/JSTypedArrays.h: Added.
* ForwardingHeaders/runtime/TypedArrayController.h: Added.
* ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
* ForwardingHeaders/runtime/TypedArrays.h: Added.
* GNUmakefile.list.am:
* Modules/webaudio/RealtimeAnalyser.h:
* Target.pri:
* UseJSC.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSArrayBufferCustom.cpp: Removed.
* bindings/js/JSArrayBufferViewHelper.h: Removed.
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSBlobCustom.cpp:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCryptoCustom.cpp:
(WebCore::JSCrypto::getRandomValues):
* bindings/js/JSDOMBinding.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):
(WebCore::wrap):
(WebCore::toJS):
(WebCore::toArrayBufferView):
(WebCore::toInt8Array):
(WebCore::toInt16Array):
(WebCore::toInt32Array):
(WebCore::toUint8Array):
(WebCore::toUint8ClampedArray):
(WebCore::toUint16Array):
(WebCore::toUint32Array):
(WebCore::toFloat32Array):
(WebCore::toFloat64Array):
(WebCore::toDataView):
* bindings/js/JSDataViewCustom.cpp: Removed.
* bindings/js/JSDictionary.cpp:
* bindings/js/JSDictionary.h:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
(WebCore::toJS):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLTemplateElementCustom.cpp:
(WebCore::JSHTMLTemplateElement::content):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSInjectedScriptHostCustom.cpp:
* bindings/js/JSMessageEventCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/WebCoreJSClientData.h:
(WebCore::initNormalWorldClientData):
* bindings/js/WebCoreTypedArrayController.cpp: Added.
(WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::toJS):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/js/WebCoreTypedArrayController.h: Added.
(WebCore::WebCoreTypedArrayController::wrapperOwner):
* bindings/scripts/CodeGenerator.pm:
(ForAllParents):
(ParseInterface):
(SkipIncludeHeader):
(IsTypedArrayType):
(IsWrapperType):
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(GetNativeType):
(JSValueToNative):
(NativeToJSValue):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append):
* fileapi/WebKitBlobBuilder.h:
* html/canvas/ArrayBuffer.idl: Removed.
* html/canvas/ArrayBufferView.idl: Removed.
* html/canvas/DataView.cpp: Removed.
* html/canvas/DataView.h: Removed.
* html/canvas/DataView.idl: Removed.
* html/canvas/Float32Array.idl: Removed.
* html/canvas/Float64Array.idl: Removed.
* html/canvas/Int16Array.idl: Removed.
* html/canvas/Int32Array.idl: Removed.
* html/canvas/Int8Array.idl: Removed.
* html/canvas/Uint16Array.idl: Removed.
* html/canvas/Uint32Array.idl: Removed.
* html/canvas/Uint8Array.idl: Removed.
* html/canvas/Uint8ClampedArray.idl: Removed.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::readPixels):
(WebCore::WebGLRenderingContext::validateTexFuncData):
* page/Crypto.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
(WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
* platform/graphics/filters/FECustomFilter.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FilterEffect.cpp:
* testing/MockCDM.cpp:

Source/WebKit2: 

Reviewed by Oliver Hunt.
        
You don't need to include JSUint8Array anymore if you just want to
unwrap one; JSDOMBinding gives you all of the things you need.

* WebProcess/InjectedBundle/InjectedBundle.cpp:

Source/WTF: 

Reviewed by Oliver Hunt.
        
- Added the notion of a reference counted object that can be marked Deferred,
  which is like a special-purpose upref.
        
- Added a common byte flipper.

Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.

* GNUmakefile.list.am:
* WTF.xcodeproj/project.pbxproj:
* wtf/DeferrableRefCounted.h: Added.
(WTF::DeferrableRefCountedBase::ref):
(WTF::DeferrableRefCountedBase::hasOneRef):
(WTF::DeferrableRefCountedBase::refCount):
(WTF::DeferrableRefCountedBase::isDeferred):
(WTF::DeferrableRefCountedBase::DeferrableRefCountedBase):
(WTF::DeferrableRefCountedBase::~DeferrableRefCountedBase):
(WTF::DeferrableRefCountedBase::derefBase):
(WTF::DeferrableRefCountedBase::setIsDeferredBase):
(WTF::DeferrableRefCounted::deref):
(WTF::DeferrableRefCounted::setIsDeferred):
(WTF::DeferrableRefCounted::DeferrableRefCounted):
(WTF::DeferrableRefCounted::~DeferrableRefCounted):
* wtf/FlipBytes.h: Added.
(WTF::needToFlipBytesIfLittleEndian):
(WTF::flipBytes):
(WTF::flipBytesIfLittleEndian):

LayoutTests: 

Reviewed by Oliver Hunt.

* fast/canvas/webgl/array-set-invalid-arguments-expected.txt:
* fast/canvas/webgl/array-set-out-of-bounds-expected.txt:
* fast/canvas/webgl/array-unit-tests-expected.txt:
* fast/canvas/webgl/array-unit-tests.html:
* fast/canvas/webgl/data-view-crash-expected.txt:
* fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js:
(checkView):
* fast/dom/call-a-constructor-as-a-function-expected.txt:
* fast/dom/call-a-constructor-as-a-function.html:
* fast/js/constructor-length.html:
* fast/js/global-constructors-attributes-dedicated-worker-expected.txt:
* fast/js/global-constructors-attributes-expected.txt:
* fast/js/global-constructors-attributes-shared-worker-expected.txt:
* fast/js/regress/ArrayBuffer-Int8Array-alloc-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc.html: Added.
* fast/js/regress/Int32Array-Int8Array-view-alloc-expected.txt: Added.
* fast/js/regress/Int32Array-Int8Array-view-alloc.html: Added.
* fast/js/regress/Int32Array-alloc-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-huge-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-huge-long-lived-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-huge-long-lived.html: Added.
* fast/js/regress/Int32Array-alloc-huge.html: Added.
* fast/js/regress/Int32Array-alloc-large-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-large-long-lived-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-large-long-lived.html: Added.
* fast/js/regress/Int32Array-alloc-large.html: Added.
* fast/js/regress/Int32Array-alloc-long-lived-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-long-lived.html: Added.
* fast/js/regress/Int32Array-alloc.html: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived-buffer.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc.js: Added.
* fast/js/regress/script-tests/Int32Array-Int8Array-view-alloc.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-huge-long-lived.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-huge.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-large-long-lived.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-large.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-long-lived.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc.js: Added.
* platform/mac/fast/js/constructor-length-expected.txt:
* webgl/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
* webgl/resources/webgl_test_files/conformance/typedarrays/data-view-test.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1a8ab279
2013-08-14 Filip Pizlo <fpizlo@apple.com>
Typed arrays should be rewritten
https://bugs.webkit.org/show_bug.cgi?id=119064
Reviewed by Oliver Hunt.
Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
* Source/autotools/symbols.filter:
2013-08-14 Tim Horton <timothy_horton@apple.com>
Un-inline dataLog dumpers for IntSize and IntPoint
......
2013-08-14 Filip Pizlo <fpizlo@apple.com>
Typed arrays should be rewritten
https://bugs.webkit.org/show_bug.cgi?id=119064
Reviewed by Oliver Hunt.
* fast/canvas/webgl/array-set-invalid-arguments-expected.txt:
* fast/canvas/webgl/array-set-out-of-bounds-expected.txt:
* fast/canvas/webgl/array-unit-tests-expected.txt:
* fast/canvas/webgl/array-unit-tests.html:
* fast/canvas/webgl/data-view-crash-expected.txt:
* fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js:
(checkView):
* fast/dom/call-a-constructor-as-a-function-expected.txt:
* fast/dom/call-a-constructor-as-a-function.html:
* fast/js/constructor-length.html:
* fast/js/global-constructors-attributes-dedicated-worker-expected.txt:
* fast/js/global-constructors-attributes-expected.txt:
* fast/js/global-constructors-attributes-shared-worker-expected.txt:
* fast/js/regress/ArrayBuffer-Int8Array-alloc-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-expected.txt: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived.html: Added.
* fast/js/regress/ArrayBuffer-Int8Array-alloc.html: Added.
* fast/js/regress/Int32Array-Int8Array-view-alloc-expected.txt: Added.
* fast/js/regress/Int32Array-Int8Array-view-alloc.html: Added.
* fast/js/regress/Int32Array-alloc-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-huge-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-huge-long-lived-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-huge-long-lived.html: Added.
* fast/js/regress/Int32Array-alloc-huge.html: Added.
* fast/js/regress/Int32Array-alloc-large-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-large-long-lived-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-large-long-lived.html: Added.
* fast/js/regress/Int32Array-alloc-large.html: Added.
* fast/js/regress/Int32Array-alloc-long-lived-expected.txt: Added.
* fast/js/regress/Int32Array-alloc-long-lived.html: Added.
* fast/js/regress/Int32Array-alloc.html: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived-buffer.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived.js: Added.
* fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc.js: Added.
* fast/js/regress/script-tests/Int32Array-Int8Array-view-alloc.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-huge-long-lived.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-huge.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-large-long-lived.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-large.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc-long-lived.js: Added.
* fast/js/regress/script-tests/Int32Array-alloc.js: Added.
* platform/mac/fast/js/constructor-length-expected.txt:
* webgl/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
* webgl/resources/webgl_test_files/conformance/typedarrays/data-view-test.html:
2013-08-15 Oliver Hunt <oliver@apple.com>
<https://webkit.org/b/119830> Assigning to a readonly global results in DFG byte code parse failure
......@@ -2,27 +2,27 @@ Verifies that attempting to set invalid elements to a Typed Array throws an exce
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS typedArray.set() threw exception TypeError: Not enough arguments.
PASS typedArray.set('hello world') threw exception TypeError: Invalid argument.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Index is out of range..
PASS typedArray.set() threw exception TypeError: Not enough arguments.
PASS typedArray.set('hello world') threw exception TypeError: Invalid argument.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Index is out of range..
PASS typedArray.set() threw exception TypeError: Not enough arguments.
PASS typedArray.set('hello world') threw exception TypeError: Invalid argument.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Index is out of range..
PASS typedArray.set() threw exception TypeError: Not enough arguments.
PASS typedArray.set('hello world') threw exception TypeError: Invalid argument.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Index is out of range..
PASS typedArray.set() threw exception TypeError: Not enough arguments.
PASS typedArray.set('hello world') threw exception TypeError: Invalid argument.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Index is out of range..
PASS typedArray.set() threw exception TypeError: Not enough arguments.
PASS typedArray.set('hello world') threw exception TypeError: Invalid argument.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Index is out of range..
PASS typedArray.set() threw exception TypeError: Not enough arguments.
PASS typedArray.set('hello world') threw exception TypeError: Invalid argument.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Index is out of range..
PASS typedArray.set() threw exception TypeError: Expected at least one argument.
PASS typedArray.set('hello world') threw exception TypeError: First argument should be an object.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS typedArray.set() threw exception TypeError: Expected at least one argument.
PASS typedArray.set('hello world') threw exception TypeError: First argument should be an object.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS typedArray.set() threw exception TypeError: Expected at least one argument.
PASS typedArray.set('hello world') threw exception TypeError: First argument should be an object.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS typedArray.set() threw exception TypeError: Expected at least one argument.
PASS typedArray.set('hello world') threw exception TypeError: First argument should be an object.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS typedArray.set() threw exception TypeError: Expected at least one argument.
PASS typedArray.set('hello world') threw exception TypeError: First argument should be an object.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS typedArray.set() threw exception TypeError: Expected at least one argument.
PASS typedArray.set('hello world') threw exception TypeError: First argument should be an object.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS typedArray.set() threw exception TypeError: Expected at least one argument.
PASS typedArray.set('hello world') threw exception TypeError: First argument should be an object.
PASS typedArray.set(otherArray, 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -4,26 +4,26 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Regression test for https://bugs.webkit.org/show_bug.cgi?id=33352 : Passing array that is too large to set method of WebGLArrays does not throw an exception
Testing Int8Array
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Range consisting of offset and length are out of bounds.
Testing Uint8Array
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Range consisting of offset and length are out of bounds.
Testing Int16Array
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Range consisting of offset and length are out of bounds.
Testing Uint16Array
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Range consisting of offset and length are out of bounds.
Testing Int32Array
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Range consisting of offset and length are out of bounds.
Testing Uint32Array
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Range consisting of offset and length are out of bounds.
Testing Float32Array
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Index is out of range..
PASS webGLArray.set([4, 5], 1) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS webGLArray.set([4, 5, 6]) threw exception RangeError: Range consisting of offset and length are out of bounds.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -4,19 +4,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS testSlice
test inheritance hierarchy of typed array views
PASS ArrayBufferView does not have [NoInterfaceObject] extended attribute and should be defined
PASS new Int8Array(1) instanceof ArrayBufferView is true
PASS new Uint8Array(1) instanceof ArrayBufferView is true
PASS new Uint8ClampedArray(1) instanceof ArrayBufferView is true
PASS new Int16Array(1) instanceof ArrayBufferView is true
PASS new Uint16Array(1) instanceof ArrayBufferView is true
PASS new Int32Array(1) instanceof ArrayBufferView is true
PASS new Uint32Array(1) instanceof ArrayBufferView is true
PASS new Float32Array(1) instanceof ArrayBufferView is true
PASS new Float64Array(1) instanceof ArrayBufferView is true
PASS new DataView(new ArrayBuffer(8)) instanceof ArrayBufferView is true
PASS new ArrayBufferView() threw TypeError
PASS new Uint8ClampedArray(1) instanceof Uint8Array is true
PASS ArrayBufferView should be undefined and is
WARN: shouldBe() expects string arguments
PASS new Uint8ClampedArray(1) instanceof Uint8Array is false
PASS test Float32Array SetAndGetPos10ToNeg10
PASS test Float32Array ConstructWithArrayOfSignedValues
PASS test Float32Array ConstructWithTypedArrayOfSignedValues
......
......@@ -119,26 +119,12 @@ function testInheritanceHierarchy() {
try {
var foo = ArrayBufferView;
testPassed('ArrayBufferView does not have [NoInterfaceObject] extended attribute and should be defined');
shouldBe('new Int8Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new Uint8Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new Uint8ClampedArray(1) instanceof ArrayBufferView', 'true');
shouldBe('new Int16Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new Uint16Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new Int32Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new Uint32Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new Float32Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new Float64Array(1) instanceof ArrayBufferView', 'true');
shouldBe('new DataView(new ArrayBuffer(8)) instanceof ArrayBufferView', 'true');
shouldThrowTypeError(function() { new ArrayBufferView() }, "new ArrayBufferView()");
testFailed("ArrayBufferView should be undefined but is defined");
} catch (e) {
testFailed('ArrayBufferView does not have [NoInterfaceObject] extended attribute but was not defined');
testPassed('ArrayBufferView should be undefined and is');
}
// There is currently only one kind of view that inherits from another
shouldBe('new Uint8ClampedArray(1) instanceof Uint8Array', 'true');
shouldBe('new Uint8ClampedArray(1) instanceof Uint8Array', false);
}
//
......
......@@ -2,8 +2,8 @@ Test that DataView does not crash with bad offset or length.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS view = new DataView(array.buffer, -4500000000) threw exception RangeError: Size is too large (or is negative)..
PASS view = new DataView(array.buffer, -4500000000, 4500000000) threw exception RangeError: Size is too large (or is negative)..
PASS view = new DataView(array.buffer, -4500000000) threw exception RangeError: Byte offset and length out of range of buffer.
PASS view = new DataView(array.buffer, -4500000000, 4500000000) threw exception RangeError: Byte offset and length out of range of buffer.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -13,6 +13,7 @@ var basicBufferTypes =
["Uint32", Uint32Array, 4],
["Int8", Int8Array, 1],
["Uint8", Uint8Array, 1],
["Uint8Clamped", Uint8ClampedArray, 1],
["Int16", Int16Array, 2],
["Uint16", Uint16Array, 2],
["Float32", Float32Array, 4],
......@@ -200,7 +201,7 @@ function checkView(testName, typedArrayType, view)
}
if (view.buffer.byteLength !== arraySize ||
(!(view instanceof DataView) && view.length !== arrayEffectiveSize / view.BYTES_PER_ELEMENT)) {
testFailed(testName + ": view has the wrong length (" + view.length + ")");
testFailed(testName + ": view has the wrong length (" + view.length + " instead of " + arrayEffectiveSize + " / " + view.BYTES_PER_ELEMENT + ")");
return false;
}
if (view.byteOffset !== arrayOffset) {
......
......@@ -3,25 +3,15 @@ This tests if TypeError is thrown or not when we call a constructor as a normal
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ArrayBuffer() threw exception TypeError: ArrayBufferConstructor is not a function (evaluating 'ArrayBuffer()').
SKIP AudioContext is not implemented.
PASS FormData() threw exception TypeError: FormDataConstructor is not a function (evaluating 'FormData()').
PASS DataView() threw exception TypeError: DataViewConstructor is not a function (evaluating 'DataView()').
PASS EventSource() threw exception TypeError: EventSourceConstructor is not a function (evaluating 'EventSource()').
PASS FileReader() threw exception TypeError: FileReaderConstructor is not a function (evaluating 'FileReader()').
PASS Float32Array() threw exception TypeError: Float32ArrayConstructor is not a function (evaluating 'Float32Array()').
PASS Float64Array() threw exception TypeError: Float64ArrayConstructor is not a function (evaluating 'Float64Array()').
PASS Audio() threw exception TypeError: AudioConstructor is not a function (evaluating 'Audio()').
PASS Image() threw exception TypeError: ImageConstructor is not a function (evaluating 'Image()').
PASS Option() threw exception TypeError: OptionConstructor is not a function (evaluating 'Option()').
PASS Int16Array() threw exception TypeError: Int16ArrayConstructor is not a function (evaluating 'Int16Array()').
PASS Int32Array() threw exception TypeError: Int32ArrayConstructor is not a function (evaluating 'Int32Array()').
PASS Int8Array() threw exception TypeError: Int8ArrayConstructor is not a function (evaluating 'Int8Array()').
PASS MessageChannel() threw exception TypeError: MessageChannelConstructor is not a function (evaluating 'MessageChannel()').
PASS SharedWorker() threw exception TypeError: SharedWorkerConstructor is not a function (evaluating 'SharedWorker()').
PASS Uint16Array() threw exception TypeError: Uint16ArrayConstructor is not a function (evaluating 'Uint16Array()').
PASS Uint32Array() threw exception TypeError: Uint32ArrayConstructor is not a function (evaluating 'Uint32Array()').
PASS Uint8Array() threw exception TypeError: Uint8ArrayConstructor is not a function (evaluating 'Uint8Array()').
PASS WebKitCSSMatrix() threw exception TypeError: WebKitCSSMatrixConstructor is not a function (evaluating 'WebKitCSSMatrix()').
PASS WebKitPoint() threw exception TypeError: WebKitPointConstructor is not a function (evaluating 'WebKitPoint()').
PASS WebSocket() threw exception TypeError: WebSocketConstructor is not a function (evaluating 'WebSocket()').
......
......@@ -6,7 +6,7 @@
description("This tests if TypeError is thrown or not when we call a constructor as a normal function.");
var test_constructors = ["ArrayBuffer", "AudioContext", "FormData", "DataView", "EventSource", "FileReader", "Float32Array", "Float64Array", "Audio", "Image", "Option", "Int16Array", "Int32Array", "Int8Array", "MessageChannel", "SharedWorker", "Uint16Array", "Uint32Array", "Uint8Array", "WebKitCSSMatrix", "WebKitPoint", "WebSocket", "Worker", "XMLHttpRequest", "XSLTProcessor"];
var test_constructors = ["AudioContext", "FormData", "EventSource", "FileReader", "Audio", "Image", "Option", "MessageChannel", "SharedWorker", "WebKitCSSMatrix", "WebKitPoint", "WebSocket", "Worker", "XMLHttpRequest", "XSLTProcessor"];
test_constructors.forEach(function (constructor) {
if (eval("window." + constructor))
......
......@@ -15,18 +15,18 @@ shouldBe('CloseEvent.length', '1');
shouldBe('CustomEvent.length', '1');
shouldBe('DOMFormData.length', '0');
shouldBe('DOMParser.length', '0');
shouldBe('DataView.length', '1');
shouldBe('DataView.length', '3');
shouldBe('ErrorEvent.length', '1');
shouldBe('Event.length', '1');
shouldBe('EventSource.length', '1');
shouldBe('Float32Array.length', '1');
shouldBe('Float64Array.length', '1');
shouldBe('Float32Array.length', '3');
shouldBe('Float64Array.length', '3');
shouldBe('FileReader.length', '0');
shouldBe('FileReaderSync.length', '0');
shouldBe('HashChangeEvent.length', '1');
shouldBe('Int16Array.length', '1');
shouldBe('Int32Array.length', '1');
shouldBe('Int8Array.length', '1');
shouldBe('Int16Array.length', '3');
shouldBe('Int32Array.length', '3');
shouldBe('Int8Array.length', '3');
shouldBe('Intent.length', '3');
shouldBe('MediaController.length', '0');
shouldBe('MediaStream.length', '0');
......@@ -42,10 +42,10 @@ shouldBe('SharedWorker.length', '1');
shouldBe('StorageEvent.length', '1');
shouldBe('TextTrackCue.length', '3');
shouldBe('TrackEvent.length', '1');
shouldBe('Uint16Array.length', '1');
shouldBe('Uint32Array.length', '1');
shouldBe('Uint8Array.length', '1');
shouldBe('Uint8ClampedArray.length', '1');
shouldBe('Uint16Array.length', '3');
shouldBe('Uint32Array.length', '3');
shouldBe('Uint8Array.length', '3');
shouldBe('Uint8ClampedArray.length', '3');
shouldBe('WebGLContextEvent.length', '1');
shouldBe('WebKitAnimationEvent.length', '1');
shouldBe('WebKitCSSMatrix.length', '0');
......
......@@ -4,21 +4,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Starting worker: script-tests/global-constructors-attributes.js
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').value is ArrayBuffer
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').value is Blob
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').value is DataView
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').value is DedicatedWorkerGlobalScope
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('set') is false
......@@ -39,31 +29,6 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').hasOwnPr
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float32Array').value is Float32Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float32Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float32Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float32Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float32Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float64Array').value is Float64Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float64Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float64Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float64Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Float64Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int16Array').value is Int16Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int16Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int16Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int32Array').value is Int32Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int32Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int32Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int32Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int32Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int8Array').value is Int8Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int8Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int8Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int8Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Int8Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageChannel').value is MessageChannel
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageChannel').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageChannel').hasOwnProperty('set') is false
......@@ -79,26 +44,6 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint16Array').value is Uint16Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint16Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint16Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint16Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint16Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint32Array').value is Uint32Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint32Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint32Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint32Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint32Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8Array').value is Uint8Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8Array').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8Array').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8Array').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').value is Uint8ClampedArray
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').value is WebSocket
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'WebSocket').hasOwnProperty('set') is false
......
......@@ -8,16 +8,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('get
PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').value is ArrayBuffer
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBufferView').value is ArrayBufferView
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBufferView').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBufferView').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBufferView').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'ArrayBufferView').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false
......@@ -263,11 +253,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').hasOwnProperty('get
PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'DOMTokenList').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'DataView').value is DataView
PASS Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'DataView').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'DataView').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode
PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('set') is false
......@@ -348,16 +333,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'FileReader').hasOwnProperty('get')
PASS Object.getOwnPropertyDescriptor(global, 'FileReader').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'FileReader').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'FileReader').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Float32Array').value is Float32Array
PASS Object.getOwnPropertyDescriptor(global, 'Float32Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Float32Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Float32Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Float32Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Float64Array').value is Float64Array
PASS Object.getOwnPropertyDescriptor(global, 'Float64Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Float64Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Float64Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Float64Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'FocusEvent').value is FocusEvent
PASS Object.getOwnPropertyDescriptor(global, 'FocusEvent').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'FocusEvent').hasOwnProperty('set') is false
......@@ -748,21 +723,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'ImageData').hasOwnProperty('get')
PASS Object.getOwnPropertyDescriptor(global, 'ImageData').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'ImageData').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'ImageData').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').value is Int16Array
PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Int32Array').value is Int32Array
PASS Object.getOwnPropertyDescriptor(global, 'Int32Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Int32Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Int32Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Int32Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Int8Array').value is Int8Array
PASS Object.getOwnPropertyDescriptor(global, 'Int8Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Int8Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Int8Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Int8Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'KeyboardEvent').value is KeyboardEvent
PASS Object.getOwnPropertyDescriptor(global, 'KeyboardEvent').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'KeyboardEvent').hasOwnProperty('set') is false
......@@ -1798,26 +1758,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get') is fal
PASS Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'URL').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'URL').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Uint16Array').value is Uint16Array
PASS Object.getOwnPropertyDescriptor(global, 'Uint16Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint16Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint16Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint16Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Uint32Array').value is Uint32Array
PASS Object.getOwnPropertyDescriptor(global, 'Uint32Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint32Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint32Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint32Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Uint8Array').value is Uint8Array
PASS Object.getOwnPropertyDescriptor(global, 'Uint8Array').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint8Array').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint8Array').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint8Array').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').value is Uint8ClampedArray
PASS Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'Uint8ClampedArray').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').value is WaveShaperNode
PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').hasOwnProperty('set') is false
......
......@@ -4,21 +4,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Starting worker: script-tests/global-constructors-attributes.js
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').value is ArrayBuffer
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ArrayBuffer').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').value is Blob
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').value is DataView
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').value is EventSource
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'EventSource').hasOwnProperty('set') is false
......@@ -34,31 +24,6 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').hasOwnPr
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'FileReaderSync').configurable is true