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

Unified Diff: tools/gen-postmortem-metadata.py

Issue 222133004: Merged r20436 into 3.25 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.25
Patch Set: Created 6 years, 9 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 | « src/version.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gen-postmortem-metadata.py
diff --git a/tools/gen-postmortem-metadata.py b/tools/gen-postmortem-metadata.py
index 2a42da53555895cbcc53c9c51cb5f71802be27f5..fff2e34b7c6b78cc74421633bbf982add465314f 100644
--- a/tools/gen-postmortem-metadata.py
+++ b/tools/gen-postmortem-metadata.py
@@ -434,9 +434,13 @@ def load_fields():
# Emit a block of constants.
#
def emit_set(out, consts):
- for ii in range(0, len(consts)):
- out.write('int v8dbg_%s = %s;\n' %
- (consts[ii]['name'], consts[ii]['value']));
+ # Fix up overzealous parses. This could be done inside the
+ # parsers but as there are several, it's easiest to do it here.
+ ws = re.compile('\s+')
+ for const in consts:
+ name = ws.sub('', const['name'])
+ value = ws.sub('', str(const['value'])) # Can be a number.
+ out.write('int v8dbg_%s = %s;\n' % (name, value))
out.write('\n');
#
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698