Skip to content

Commit 867e195

Browse files
committed
Added Arrays and ArrayBuffer to GlobalObject
1 parent 03f5e79 commit 867e195

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

JavaScriptCore/runtime/JSGlobalObject.cpp

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,16 @@
7474

7575
// PL Typed Arrays
7676

77+
#include "JSArrayBuffer.h"
7778
#include "JSFloat32Array.h"
79+
#include "JSFloat64Array.h"
80+
#include "JSInt8Array.h"
81+
#include "JSInt16Array.h"
82+
#include "JSInt32Array.h"
83+
#include "JSUint8ClampedArray.h"
84+
#include "JSUint8Array.h"
85+
#include "JSUint16Array.h"
86+
#include "JSUint32Array.h"
7887

7988
#include "JSGlobalObject.lut.h"
8089

@@ -297,8 +306,38 @@ void JSGlobalObject::reset(JSValue prototype)
297306

298307

299308
// PL Typed Arrays
309+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSArrayBuffer::s_info.className),
310+
WebCore::JSArrayBuffer::getConstructor(exec, this), DontEnum);
311+
300312
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSFloat32Array::s_info.className),
301-
WebCore::JSFloat32Array::getConstructor(exec, this), DontEnum);
313+
WebCore::JSFloat32Array::getConstructor(exec, this), DontEnum);
314+
315+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSFloat32Array::s_info.className),
316+
WebCore::JSFloat32Array::getConstructor(exec, this), DontEnum);
317+
318+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSFloat64Array::s_info.className),
319+
WebCore::JSFloat64Array::getConstructor(exec, this), DontEnum);
320+
321+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSInt8Array::s_info.className),
322+
WebCore::JSInt8Array::getConstructor(exec, this), DontEnum);
323+
324+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSInt16Array::s_info.className),
325+
WebCore::JSInt16Array::getConstructor(exec, this), DontEnum);
326+
327+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSInt32Array::s_info.className),
328+
WebCore::JSInt32Array::getConstructor(exec, this), DontEnum);
329+
330+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSUint8ClampedArray::s_info.className),
331+
WebCore::JSUint8ClampedArray::getConstructor(exec, this), DontEnum);
332+
333+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSUint8Array::s_info.className),
334+
WebCore::JSUint8Array::getConstructor(exec, this), DontEnum);
335+
336+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSUint16Array::s_info.className),
337+
WebCore::JSUint16Array::getConstructor(exec, this), DontEnum);
338+
339+
putDirectWithoutTransition(exec->globalData(), Identifier(exec, WebCore::JSUint32Array::s_info.className),
340+
WebCore::JSFloat32Array::getConstructor(exec, this), DontEnum);
302341

303342

304343
m_evalFunction.set(exec->globalData(), this, JSFunction::create(exec, this, 1, exec->propertyNames().eval, globalFuncEval));

0 commit comments

Comments
 (0)