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 350e7184bcebe00fa6c94f93fdc119a03917fbdb..c729d815ab8cb8ddb6b3152b380fbff80ae96549 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();