Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 22ace174d206988a69bf15ceab7ad59e27844965..958f4760e72bb0bf905552c559409fa98b934679 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -1459,28 +1459,30 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) { |
global_template->Set(String::New("Realm"), realm_template); |
// Bind the handlers for external arrays. |
- PropertyAttribute attr = |
- static_cast<PropertyAttribute>(ReadOnly | DontDelete); |
- global_template->Set(PerIsolateData::ArrayBuffer_string(isolate), |
- CreateArrayBufferTemplate(ArrayBuffer), attr); |
- global_template->Set(String::New("Int8Array"), |
- CreateArrayTemplate(Int8Array), attr); |
- global_template->Set(String::New("Uint8Array"), |
- CreateArrayTemplate(Uint8Array), attr); |
- global_template->Set(String::New("Int16Array"), |
- CreateArrayTemplate(Int16Array), attr); |
- global_template->Set(String::New("Uint16Array"), |
- CreateArrayTemplate(Uint16Array), attr); |
- global_template->Set(String::New("Int32Array"), |
- CreateArrayTemplate(Int32Array), attr); |
- global_template->Set(String::New("Uint32Array"), |
- CreateArrayTemplate(Uint32Array), attr); |
- global_template->Set(String::New("Float32Array"), |
- CreateArrayTemplate(Float32Array), attr); |
- global_template->Set(String::New("Float64Array"), |
- CreateArrayTemplate(Float64Array), attr); |
- global_template->Set(String::New("Uint8ClampedArray"), |
- CreateArrayTemplate(Uint8ClampedArray), attr); |
+ if (!i::FLAG_harmony_typed_arrays) { |
+ PropertyAttribute attr = |
+ static_cast<PropertyAttribute>(ReadOnly | DontDelete); |
+ global_template->Set(PerIsolateData::ArrayBuffer_string(isolate), |
+ CreateArrayBufferTemplate(ArrayBuffer), attr); |
+ global_template->Set(String::New("Int8Array"), |
+ CreateArrayTemplate(Int8Array), attr); |
+ global_template->Set(String::New("Uint8Array"), |
+ CreateArrayTemplate(Uint8Array), attr); |
+ global_template->Set(String::New("Int16Array"), |
+ CreateArrayTemplate(Int16Array), attr); |
+ global_template->Set(String::New("Uint16Array"), |
+ CreateArrayTemplate(Uint16Array), attr); |
+ global_template->Set(String::New("Int32Array"), |
+ CreateArrayTemplate(Int32Array), attr); |
+ global_template->Set(String::New("Uint32Array"), |
+ CreateArrayTemplate(Uint32Array), attr); |
+ global_template->Set(String::New("Float32Array"), |
+ CreateArrayTemplate(Float32Array), attr); |
+ global_template->Set(String::New("Float64Array"), |
+ CreateArrayTemplate(Float64Array), attr); |
+ global_template->Set(String::New("Uint8ClampedArray"), |
+ CreateArrayTemplate(Uint8ClampedArray), attr); |
+ } |
#if !defined(V8_SHARED) && !defined(_WIN32) && !defined(_WIN64) |
Handle<ObjectTemplate> os_templ = ObjectTemplate::New(); |