2 Star 0 Fork 1

OpenCloudOS Stream/qt5-qtwebkit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webkit-offlineasm-warnings-ruby27.patch 2.04 KB
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2024-05-12 23:47 +08:00 . update
From c7d19a492d97f9282a546831beb918e03315f6ef Mon Sep 17 00:00:00 2001
From: Adrian Perez de Castro <aperez@igalia.com>
Date: Wed, 15 Jan 2020 22:15:38 +0000
Subject: [PATCH] Offlineasm warnings with newer Ruby versions
https://bugs.webkit.org/show_bug.cgi?id=206233
Reviewed by Yusuke Suzuki.
Avoid a warning about using Object#=~ on Annotation instances, which
has been deprecated in Ruby 2.7.
* offlineasm/parser.rb: Swap checks to prevent applying the =~ operator
to Annotation instances, which do not define it.
Canonical link: https://commits.webkit.org/219400@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
---
Source/JavaScriptCore/ChangeLog | 13 +++++++++++++
Source/JavaScriptCore/offlineasm/parser.rb | 6 +++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/Source/JavaScriptCore/offlineasm/parser.rb b/Source/JavaScriptCore/offlineasm/parser.rb
index 791c81a9868d..f14c873e2dbd 100644
--- a/Source/JavaScriptCore/offlineasm/parser.rb
+++ b/Source/JavaScriptCore/offlineasm/parser.rb
@@ -628,9 +628,7 @@ def parseSequence(final, comment)
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.
@@ -644,6 +642,8 @@ def parseSequence(final, comment)
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/qt5-qtwebkit.git
git@gitee.com:opencloudos-stream/qt5-qtwebkit.git
opencloudos-stream
qt5-qtwebkit
qt5-qtwebkit
master

搜索帮助