Fix nasty off-by-one in the TurboFan JSON tracer.
authormstarzinger <mstarzinger@chromium.org>
Thu, 12 Feb 2015 09:16:18 +0000 (01:16 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 12 Feb 2015 09:16:29 +0000 (09:16 +0000)
R=danno@chromium.org
TEST=cctest/test-run-intrinsics/CallFunction

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

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

src/compiler/pipeline.cc

index 8c05779..b105a31 100644 (file)
@@ -838,7 +838,7 @@ Handle<Code> Pipeline::GenerateCode() {
       if (!script->IsUndefined() && !script->source()->IsUndefined()) {
         DisallowHeapAllocation no_allocation;
         int start = function->start_position();
-        int len = function->end_position() - start + 1;
+        int len = function->end_position() - start;
         String::SubStringRange source(String::cast(script->source()), start,
                                       len);
         for (const auto& c : source) {