Bug 1531323 - Fix incorrect classTypeCode in ClassField. r=jorendorff
authorAshley Hauck <khyperia@mozilla.com>
Fri, 01 Mar 2019 01:17:47 +0000
changeset 519818 de9645abe21adfafb8ab0df41d4325f6a33f8dc4
parent 519817 10ba5f802d6666a39ce50f4bc597c68e2d130672
child 519819 ec7068a12a7b90ad6ceb368a4ee6097986b21559
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1531323
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1531323 - Fix incorrect classTypeCode in ClassField. r=jorendorff Differential Revision: https://phabricator.services.mozilla.com/D21530
js/src/frontend/ParseNode.h
--- a/js/src/frontend/ParseNode.h
+++ b/js/src/frontend/ParseNode.h
@@ -1953,21 +1953,21 @@ class ClassField : public BinaryNode {
   ClassField(ParseNode* name, ParseNode* initializer)
       : BinaryNode(ParseNodeKind::ClassField, JSOP_NOP,
                    initializer == nullptr
                        ? name->pn_pos
                        : TokenPos::box(name->pn_pos, initializer->pn_pos),
                    name, initializer) {}
 
   static bool test(const ParseNode& node) {
-    return node.isKind(ParseNodeKind::ClassField);
+    bool match = node.isKind(ParseNodeKind::ClassField);
+    MOZ_ASSERT_IF(match, node.is<BinaryNode>());
+    return match;
   }
 
-  static constexpr TypeCode classTypeCode() { return TypeCode::Other; }
-
   ParseNode& name() const { return *left(); }
 
   bool hasInitializer() const { return right() != nullptr; }
 
   FunctionNode& initializer() const { return right()->as<FunctionNode>(); }
 };
 
 class SwitchStatement : public BinaryNode {