diff src/share/vm/classfile/classLoaderData.cpp @ 14378:48314d596a04

8027146: Class loading verification failure if GC occurs in Universe::flush_dependents_on Summary: Remove search in system dictionary and hacks, replace with verifying in CLD::_klasses list. Reviewed-by: dcubed, acorn
author coleenp
date Sat, 15 Feb 2014 13:03:38 -0500
parents ce86c36b8921
children f460c6926af7 7384f6a12fc1
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoaderData.cpp	Fri Feb 14 16:17:22 2014 +0100
+++ b/src/share/vm/classfile/classLoaderData.cpp	Sat Feb 15 13:03:38 2014 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -520,6 +520,13 @@
   }
 }
 
+bool ClassLoaderData::contains_klass(Klass* klass) {
+  for (Klass* k = _klasses; k != NULL; k = k->next_link()) {
+    if (k == klass) return true;
+  }
+  return false;
+}
+
 
 // GC root of class loader data created.
 ClassLoaderData* ClassLoaderDataGraph::_head = NULL;