From 928cd15d3d3ab82734f49eb9d694faf59c3a0c6d Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Thu, 6 Apr 2017 10:05:55 +0300 Subject: Import WebKit commit 342c7c7c069db3ca1d09ae6c5f7d600f9b241778 Change-Id: I8886595114569f61168aed76b23ad7288c5cb34c Reviewed-by: Konstantin Tokarev --- Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h | 2 +- .../runtime/JSGenericTypedArrayViewConstructor.h | 12 ++++++++++++ .../runtime/JSGenericTypedArrayViewPrototype.h | 14 +++++++++++++- Source/JavaScriptCore/runtime/TypedArrayAdaptors.h | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) (limited to 'Source/JavaScriptCore/runtime') diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h index bd437e4ad..bc323021a 100644 --- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h +++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h @@ -150,7 +150,7 @@ public: void setIndexQuicklyToDouble(unsigned i, double value) { - setIndexQuicklyToNativeValue(i, toNativeFromValue(value)); + setIndexQuicklyToNativeValue(i, toNativeFromValue(jsNumber(value))); } void setIndexQuickly(unsigned i, JSValue value) diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h index 5590df42e..d89fd034e 100644 --- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h +++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h @@ -43,7 +43,19 @@ public: static JSGenericTypedArrayViewConstructor* create( VM&, JSGlobalObject*, Structure*, JSObject* prototype, const String& name, FunctionExecutable* privateAllocator); + // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundefined-var-template" +#endif +#endif DECLARE_INFO; +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic pop +#endif +#endif static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h index 7ef77490a..12d381246 100644 --- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h +++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h @@ -42,8 +42,20 @@ protected: public: static JSGenericTypedArrayViewPrototype* create( VM&, JSGlobalObject*, Structure*); - + + // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundefined-var-template" +#endif +#endif DECLARE_INFO; +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic pop +#endif +#endif static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); }; diff --git a/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h b/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h index d4dc53557..270e36860 100644 --- a/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h +++ b/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h @@ -27,6 +27,7 @@ #define TypedArrayAdaptors_h #include "JSCJSValue.h" +#include "MathCommon.h" #include "TypedArrayType.h" #include -- cgit v1.2.1