Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
391fe3b6
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
391fe3b6
编写于
3月 13, 2015
作者:
H
hannesw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8075006: Threads spinning infinitely in WeakHashMap.get running test262parallel
Reviewed-by: lagergren, attila
上级
4b166224
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
11 deletion
+14
-11
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/PropertyMap.java
...are/classes/jdk/nashorn/internal/runtime/PropertyMap.java
+14
-11
未找到文件。
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/PropertyMap.java
浏览文件 @
391fe3b6
...
...
@@ -330,12 +330,15 @@ public final class PropertyMap implements Iterable<Object>, Serializable {
* Indicate that proto itself has changed in hierarchy somewhere.
*/
synchronized
void
invalidateAllProtoGetSwitchPoints
()
{
if
(
protoGetSwitches
!=
null
&&
!
protoGetSwitches
.
isEmpty
())
{
if
(
Context
.
DEBUG
)
{
protoInvalidations
+=
protoGetSwitches
.
size
();
if
(
protoGetSwitches
!=
null
)
{
final
int
size
=
protoGetSwitches
.
size
();
if
(
size
>
0
)
{
if
(
Context
.
DEBUG
)
{
protoInvalidations
+=
size
;
}
SwitchPoint
.
invalidateAll
(
protoGetSwitches
.
values
().
toArray
(
new
SwitchPoint
[
size
]));
protoGetSwitches
.
clear
();
}
SwitchPoint
.
invalidateAll
(
protoGetSwitches
.
values
().
toArray
(
new
SwitchPoint
[
protoGetSwitches
.
values
().
size
()]));
protoGetSwitches
.
clear
();
}
}
...
...
@@ -375,7 +378,8 @@ public final class PropertyMap implements Iterable<Object>, Serializable {
}
}
// Update the free slots bitmap for a property that has been deleted and/or added.
// Update the free slots bitmap for a property that has been deleted and/or added. This method is not synchronized
// as it is always invoked on a newly created instance.
private
void
updateFreeSlots
(
final
Property
oldProperty
,
final
Property
newProperty
)
{
// Free slots bitset is possibly shared with parent map, so we must clone it before making modifications.
boolean
freeSlotsCloned
=
false
;
...
...
@@ -425,7 +429,7 @@ public final class PropertyMap implements Iterable<Object>, Serializable {
*
* @return New {@link PropertyMap} with {@link Property} added.
*/
public
PropertyMap
addProperty
(
final
Property
property
)
{
public
synchronized
PropertyMap
addProperty
(
final
Property
property
)
{
if
(
listeners
!=
null
)
{
listeners
.
propertyAdded
(
property
);
}
...
...
@@ -434,9 +438,9 @@ public final class PropertyMap implements Iterable<Object>, Serializable {
if
(
newMap
==
null
)
{
final
PropertyHashMap
newProperties
=
properties
.
immutableAdd
(
property
);
newMap
=
new
PropertyMap
(
this
,
newProperties
);
addToHistory
(
property
,
newMap
);
newMap
.
updateFlagsAndBoundaries
(
property
);
newMap
.
updateFreeSlots
(
null
,
property
);
addToHistory
(
property
,
newMap
);
}
return
newMap
;
...
...
@@ -449,7 +453,7 @@ public final class PropertyMap implements Iterable<Object>, Serializable {
*
* @return New {@link PropertyMap} with {@link Property} removed or {@code null} if not found.
*/
public
PropertyMap
deleteProperty
(
final
Property
property
)
{
public
synchronized
PropertyMap
deleteProperty
(
final
Property
property
)
{
if
(
listeners
!=
null
)
{
listeners
.
propertyDeleted
(
property
);
}
...
...
@@ -881,8 +885,7 @@ public final class PropertyMap implements Iterable<Object>, Serializable {
* @param newProto New prototype object to replace oldProto.
* @return New {@link PropertyMap} with prototype changed.
*/
public
PropertyMap
changeProto
(
final
ScriptObject
newProto
)
{
public
synchronized
PropertyMap
changeProto
(
final
ScriptObject
newProto
)
{
final
PropertyMap
nextMap
=
checkProtoHistory
(
newProto
);
if
(
nextMap
!=
null
)
{
return
nextMap
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录