Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e324d8

Browse filesBrowse files
evan.lucasofrobots
authored andcommitted
deps: backport bc2e393 from v8 upstream
Original commit message: [tools] Make gen-postmortem-metadata.py more reliable Instead of basing matches off of whitespace, walk the inheritance chain and include any classes that inherit from Object. R=machenbach@chromium.org,jkummerow@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/1435643002 Cr-Commit-Position: refs/heads/master@{#31964} This adds some missing classes to postmortem info like JSMap and JSSet. Ref: #3792 PR-URL: #4106 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
1 parent d9d050d commit 1e324d8
Copy full SHA for 1e324d8

File tree

Expand file treeCollapse file tree

1 file changed

+21
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-2
lines changed
Open diff view settings
Collapse file

‎deps/v8/tools/gen-postmortem-metadata.py‎

Copy file name to clipboardExpand all lines: deps/v8/tools/gen-postmortem-metadata.py
+21-2Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,20 @@
273273
}
274274
'''
275275

276+
#
277+
# Get the base class
278+
#
279+
def get_base_class(klass):
280+
if (klass == 'Object'):
281+
return klass;
282+
283+
if (not (klass in klasses)):
284+
return None;
285+
286+
k = klasses[klass];
287+
288+
return get_base_class(k['parent']);
289+
276290
#
277291
# Loads class hierarchy and type information from "objects.h".
278292
#
@@ -311,12 +325,14 @@ def load_objects():
311325
typestr += line;
312326
continue;
313327

314-
match = re.match('class (\w[^\s:]*)(: public (\w[^\s{]*))?\s*{',
328+
match = re.match('class (\w[^:]*)(: public (\w[^{]*))?\s*{\s*',
315329
line);
316330

317331
if (match):
318-
klass = match.group(1);
332+
klass = match.group(1).rstrip().lstrip();
319333
pklass = match.group(3);
334+
if (pklass):
335+
pklass = pklass.rstrip().lstrip();
320336
klasses[klass] = { 'parent': pklass };
321337

322338
#
@@ -567,6 +583,9 @@ def emit_config():
567583
keys.sort();
568584
for klassname in keys:
569585
pklass = klasses[klassname]['parent'];
586+
bklass = get_base_class(klassname);
587+
if (bklass != 'Object'):
588+
continue;
570589
if (pklass == None):
571590
continue;
572591

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.