Skip to content

Commit 8a8bf86

Browse files
LiedtkeV8-internal LUCI CQ
authored andcommitted
[environment] Don't print warning for enum object groups
Change-Id: I804f24170903e3588552022b2a403dab27f3f9a4 Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/8738176 Reviewed-by: Danylo Mocherniuk <mdanylo@google.com> Auto-Submit: Matthias Liedtke <mliedtke@google.com> Commit-Queue: Matthias Liedtke <mliedtke@google.com> Commit-Queue: Danylo Mocherniuk <mdanylo@google.com>
1 parent 794c0f0 commit 8a8bf86

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

Sources/Fuzzilli/Environment/JavaScriptEnvironment.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,8 @@ public class JavaScriptEnvironment: ComponentBase {
830830
if let signatures = group.methods[propertyName] {
831831
return .unboundFunction(signatures.first, receiver: baseType)
832832
}
833-
} else {
834-
// This shouldn't happen, probably forgot to register the object group
833+
} else if !baseType.isEnumerationOrNamedString {
834+
// This shouldn't happen, probably forgot to register the object group.
835835
logger.warning("No type information for object group \(groupName) available")
836836
}
837837
}
@@ -845,7 +845,7 @@ public class JavaScriptEnvironment: ComponentBase {
845845
if let signatures = group.methods[methodName] {
846846
return signatures
847847
}
848-
} else {
848+
} else if !baseType.isEnumerationOrNamedString {
849849
// This shouldn't happen, probably forgot to register the object group
850850
logger.warning("No type information for object group \(groupName) available")
851851
}

Sources/Fuzzilli/FuzzIL/TypeSystem.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,14 @@ public struct ILType: Hashable {
493493
return Is(.constructor()) ? ext?.signature : nil
494494
}
495495

496-
public var isEnumeration : Bool {
496+
public var isEnumeration: Bool {
497497
return Is(.string) && ext != nil && !ext!.properties.isEmpty
498498
}
499499

500+
public var isEnumerationOrNamedString: Bool {
501+
return Is(.string) && ext != nil && group != nil
502+
}
503+
500504
public var group: String? {
501505
return ext?.group
502506
}

0 commit comments

Comments
 (0)