changeset 934:aba04734b61e

Merge
author kvn
date Tue, 25 Aug 2009 13:08:40 -0700
parents a774e1abbe85 (diff) cdb8b7c37ac1 (current diff)
children b1606b3c0a8a 489a4f8dcd0f bb287c042e99
files
diffstat 6 files changed, 25 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Aug 24 22:26:15 2009 -0700
+++ b/.hgtags	Tue Aug 25 13:08:40 2009 -0700
@@ -41,3 +41,7 @@
 ba36394eb84b949b31212bdb32a518a8f92bab5b jdk7-b64
 ba313800759b678979434d6da8ed3bf49eb8bea4 jdk7-b65
 57c71ad0341b8b64ed20f81151eb7f06324f8894 jdk7-b66
+18f526145aea355a9320b724373386fc2170f183 jdk7-b67
+d07e68298d4e17ebf93d8299e43fcc3ded26472a jdk7-b68
+54fd4d9232969ea6cd3d236e5ad276183bb0d423 jdk7-b69
+0632c3e615a315ff11e2ab1d64f4d82ff9853461 jdk7-b70
--- a/THIRD_PARTY_README	Mon Aug 24 22:26:15 2009 -0700
+++ b/THIRD_PARTY_README	Tue Aug 25 13:08:40 2009 -0700
@@ -32,7 +32,7 @@
 
 --- end of LICENSE file ---
 %% This notice is provided with respect to ASM, which may be included with this software: 
-Copyright (c) 2000-2005 INRIA, France Telecom
+Copyright (c) 2000-2007 INRIA, France Telecom
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
--- a/make/hotspot_version	Mon Aug 24 22:26:15 2009 -0700
+++ b/make/hotspot_version	Tue Aug 25 13:08:40 2009 -0700
@@ -33,9 +33,9 @@
 # Don't put quotes (fail windows build).
 HOTSPOT_VM_COPYRIGHT=Copyright 2009
 
-HS_MAJOR_VER=16
+HS_MAJOR_VER=17
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=07
+HS_BUILD_NUMBER=01
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Aug 24 22:26:15 2009 -0700
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Aug 25 13:08:40 2009 -0700
@@ -2401,7 +2401,7 @@
         // Now process this portion of this one.
         int lim = MIN2(next_arr_ind, len);
         for (int j = arr_ind; j < lim; j++) {
-          do_oop(aobj->obj_at_addr<T>(j));
+          do_oop(aobj->objArrayOopDesc::obj_at_addr<T>(j));
         }
 
       } else {
--- a/src/share/vm/prims/jniCheck.cpp	Mon Aug 24 22:26:15 2009 -0700
+++ b/src/share/vm/prims/jniCheck.cpp	Tue Aug 25 13:08:40 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, Inc.  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
@@ -96,6 +96,7 @@
 static const char * fatal_class_not_a_class = "JNI received a class argument that is not a class";
 static const char * fatal_class_not_a_throwable_class = "JNI Throw or ThrowNew received a class argument that is not a Throwable or Throwable subclass";
 static const char * fatal_wrong_class_or_method = "Wrong object class or methodID passed to JNI call";
+static const char * fatal_non_weak_method = "non-weak methodID passed to JNI call";
 static const char * fatal_unknown_array_object = "Unknown array object passed to JNI array operations";
 static const char * fatal_object_array_expected = "Object array expected but not received for JNI array operation";
 static const char * fatal_non_array  = "Non-array passed to JNI array operations";
@@ -291,10 +292,16 @@
 
 methodOop jniCheck::validate_jmethod_id(JavaThread* thr, jmethodID method_id) {
   ASSERT_OOPS_ALLOWED;
+  // do the fast jmethodID check first
   methodOop moop = JNIHandles::checked_resolve_jmethod_id(method_id);
   if (moop == NULL) {
     ReportJNIFatalError(thr, fatal_wrong_class_or_method);
   }
+  // jmethodIDs are supposed to be weak global handles, but that
+  // can be expensive so check it last
+  else if (!JNIHandles::is_weak_global_handle((jobject) method_id)) {
+    ReportJNIFatalError(thr, fatal_non_weak_method);
+  }
   return moop;
 }
 
--- a/src/share/vm/runtime/jniHandles.hpp	Mon Aug 24 22:26:15 2009 -0700
+++ b/src/share/vm/runtime/jniHandles.hpp	Tue Aug 25 13:08:40 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1998-2009 Sun Microsystems, Inc.  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
@@ -196,12 +196,16 @@
 };
 
 inline methodOop JNIHandles::checked_resolve_jmethod_id(jmethodID mid) {
-  jobject handle = (jobject)mid;
-  if (is_weak_global_handle(handle)) {
-    return (methodOop) resolve_non_null(handle);
-  } else {
+  if (mid == NULL) {
     return (methodOop) NULL;
   }
+
+  oop o = resolve_non_null((jobject) mid);
+  if (!o->is_method()) {
+    return (methodOop) NULL;
+  }
+
+  return (methodOop) o;
 };