hotspot/src/share/vm/code/dependencies.cpp
changeset 46271 979ebd346ecf
parent 40362 94addd7cfa10
child 46630 75aa3e39d02c
--- a/hotspot/src/share/vm/code/dependencies.cpp	Tue Feb 14 20:00:28 2017 -0800
+++ b/hotspot/src/share/vm/code/dependencies.cpp	Wed Feb 15 22:59:57 2017 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, 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
@@ -714,7 +714,8 @@
   if (xtty == NULL) {
     return;
   }
-  ResourceMark rm;
+  Thread* thread = Thread::current();
+  HandleMark rm(thread);
   ttyLocker ttyl;
   int ctxkj = dep_context_arg(dept);  // -1 if no context arg
   if (witness != NULL) {
@@ -732,14 +733,14 @@
     DepArgument arg = args->at(j);
     if (j == 1) {
       if (arg.is_oop()) {
-        xtty->object("x", arg.oop_value());
+        xtty->object("x", Handle(thread, arg.oop_value()));
       } else {
         xtty->object("x", arg.metadata_value());
       }
     } else {
       char xn[10]; sprintf(xn, "x%d", j);
       if (arg.is_oop()) {
-        xtty->object(xn, arg.oop_value());
+        xtty->object(xn, Handle(thread, arg.oop_value()));
       } else {
         xtty->object(xn, arg.metadata_value());
       }