Fix installing of SIMD object on global object.
authormstarzinger <mstarzinger@chromium.org>
Mon, 20 Jul 2015 10:37:43 +0000 (03:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 20 Jul 2015 10:37:58 +0000 (10:37 +0000)
We should not install the SIMD object on the global object unless
support for SIMD is actually turned on by the flag. Otherwise calling
SIMD.Float32x4() will hit unreachable code. We accidentally SIMD.

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/1240223002

Cr-Commit-Position: refs/heads/master@{#29749}

src/bootstrapper.cc

index 350e718..c729d81 100644 (file)
@@ -1987,6 +1987,8 @@ void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
 
 
 void Genesis::InitializeGlobal_harmony_simd() {
+  if (!FLAG_harmony_simd) return;
+
   Handle<JSGlobalObject> global(
       JSGlobalObject::cast(native_context()->global_object()));
   Isolate* isolate = global->GetIsolate();