Skip to content

Commit 8aba53c

Browse files
LiedtkeV8-internal LUCI CQ
authored andcommitted
[v8] Add functions from --expose-externalize-string to environment
and skip their prototypes in FuzzilliDetectMissingBuiltins. Bug: 487347678 Change-Id: Ib74c990924c2b194f486c14c8578148240b9a1f5 Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/9064302 Auto-Submit: Matthias Liedtke <mliedtke@google.com> Reviewed-by: Michael Achenbach <machenbach@google.com> Commit-Queue: Michael Achenbach <machenbach@google.com>
1 parent 0ef67b2 commit 8aba53c

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Sources/Fuzzilli/Profiles/V8Profile.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ public let v8Profile = Profile(
9898
"gc" : .function([.opt(gcOptions.instanceType)] => (.undefined | .jsPromise)),
9999
"d8" : .jsD8,
100100
"Worker": .constructor([.jsAnything, .object()] => .object(withMethods: ["postMessage","getMessage"])),
101+
// via --expose-externalize-string:
102+
"externalizeString": .function([.plain(.jsString)] => .jsString),
103+
"isOneByteString": .function([.plain(.jsString)] => .boolean),
104+
"createExternalizableString": .function([.plain(.jsString)] => .jsString),
105+
"createExternalizableTwoByteString": .function([.plain(.jsString)] => .jsString),
101106
],
102107

103108
additionalObjectGroups: [jsD8, jsD8Test, jsD8FastCAPI, gcOptions],

Sources/FuzzilliDetectMissingBuiltins/main.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ let exclusionList : [String: [String]] = [
2020
// TODO(mliedtke): https://crbug.com/488072252.
2121
"Realm",
2222
]
23+
// These functions are exposed via --expose-externalize-string for testing purposes. The functions
24+
// should be registered but their prototype objects do not matter.
25+
+ ["externalizeString", "isOneByteString", "createExternalizableString",
26+
"createExternalizableTwoByteString"].map {"\($0).prototype"}
2327
]
2428

2529
// Disable most logging. The JavaScriptEnvironment prints warning when trying to fetch types for

0 commit comments

Comments
 (0)