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

Unified Diff: tools/js2c.py

Issue 21367002: Zero terminate script names generated by js2c. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months 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: tools/js2c.py
diff --git a/tools/js2c.py b/tools/js2c.py
index 9492b0030c0dbf56f91f78208230e3aa89db300e..49186e846022e00f417628203ce488313e4c637f 100644
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -259,7 +259,7 @@ namespace internal {
template <>
Vector<const char> NativesCollection<%(type)s>::GetScriptName(int index) {
%(get_script_name_cases)s\
- return Vector<const char>("", 0);
+ return Vector<const char>("", 1);
}
template <>
@@ -364,7 +364,7 @@ def JS2C(source, target, env):
})
get_script_name_cases.append(GET_SCRIPT_NAME_CASE % {
'name': native_name,
- 'length': len(native_name),
+ 'length': len(native_name) + 1,
'i': i
})
i = i + 1
« 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