Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: src/natives-external.cc

Issue 792733003: Fix mirror-script and debug tests when using external natives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/natives-external.cc
diff --git a/src/natives-external.cc b/src/natives-external.cc
index cfa00bc1345a1cb746d8946ceeb272cf7d444eeb..75e521854d3743fe9f096d991b0b587fc167951c 100644
--- a/src/natives-external.cc
+++ b/src/natives-external.cc
@@ -82,6 +82,10 @@ class NativesStore {
builder.AddString("native ");
builder.AddSubstring(reinterpret_cast<const char*>(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<const char>::cast(name);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698