Skip to content

Commit 405811d

Browse files
BridgeJS: Use shared decodeString for JSTypedClosure error path
1 parent ba66ff1 commit 405811d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ public struct BridgeJSLink {
660660
helperPrinter.write("let length = 0;")
661661
helperPrinter.write("while (bytes[length] !== 0) { length += 1; }")
662662
helperPrinter.write(
663-
"const fileID = \(JSGlueVariableScope.reservedTextDecoder).decode(bytes.subarray(0, length));"
663+
"const fileID = \(JSGlueVariableScope.reservedDecodeString)(state.file, length);"
664664
)
665665
helperPrinter.write(
666666
"throw new Error(`Attempted to call a released JSTypedClosure created at ${fileID}:${state.line}`);"

0 commit comments

Comments
 (0)