File webkitgtk-ruby-3.2.patch of Package mingw64-webkitgtk
diff -ur webkitgtk-2.4.11.orig/Source/JavaScriptCore/offlineasm/parser.rb webkitgtk-2.4.11/Source/JavaScriptCore/offlineasm/parser.rb
--- webkitgtk-2.4.11.orig/Source/JavaScriptCore/offlineasm/parser.rb 2016-04-10 08:48:36.000000000 +0200
+++ webkitgtk-2.4.11/Source/JavaScriptCore/offlineasm/parser.rb 2023-06-02 18:02:04.726348689 +0200
@@ -503,9 +503,7 @@
firstCodeOrigin = @tokens[@idx].codeOrigin
list = []
loop {
- if (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
- break
- elsif @tokens[@idx].is_a? Annotation
+ if @tokens[@idx].is_a? Annotation
# This is the only place where we can encounter a global
# annotation, and hence need to be able to distinguish between
# them.
@@ -519,6 +517,8 @@
list << Instruction.new(codeOrigin, annotationOpcode, [], @tokens[@idx].string)
@annotation = nil
@idx += 2 # Consume the newline as well.
+ elsif (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
+ break
elsif @tokens[@idx] == "\n"
# ignore
@idx += 1