From 65006b85b7072e4332adb6afc9017030c3936e36 Mon Sep 17 00:00:00 2001 From: vogelheim Date: Wed, 10 Dec 2014 08:06:00 -0800 Subject: [PATCH] Fix mirror-script and debug-script tests when using external natives. R=yangguo BUG= Review URL: https://codereview.chromium.org/792733003 Cr-Commit-Position: refs/heads/master@{#25752} --- src/natives-external.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/natives-external.cc b/src/natives-external.cc index 4312091..138abe1 100644 --- a/src/natives-external.cc +++ b/src/natives-external.cc @@ -87,6 +87,10 @@ class NativesStore { builder.AddString("native "); builder.AddSubstring(reinterpret_cast(id), id_length); builder.AddString(".js"); + builder.Finalize(); + // SimpleStringBuilder wants zero-byte; the caller does not. + DCHECK(name[name.length() - 1] == '\0'); + name.Truncate(name.length() - 1); return Vector::cast(name); } -- 2.7.4