summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime')
-rw-r--r--Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h2
-rw-r--r--Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h12
-rw-r--r--Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h14
-rw-r--r--Source/JavaScriptCore/runtime/TypedArrayAdaptors.h1
4 files changed, 27 insertions, 2 deletions
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<Adaptor>(value));
+ setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(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 <wtf/MathExtras.h>