8148214: Slow object allocation due to multiple synchronization
authorhannesw
Tue, 26 Jan 2016 13:46:00 +0100
changeset 35406 b49d0656c449
parent 35361 4a652e4ca952
child 35407 204abe4d8cbc
8148214: Slow object allocation due to multiple synchronization Reviewed-by: attila, mhaupt
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptFunction.java
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptFunction.java	Wed Jul 05 21:15:54 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptFunction.java	Tue Jan 26 13:46:00 2016 +0100
@@ -553,7 +553,7 @@
      * @param prototype actual prototype object
      * @return property map
      */
-    private synchronized PropertyMap getAllocatorMap(final ScriptObject prototype) {
+    private PropertyMap getAllocatorMap(final ScriptObject prototype) {
         if (allocatorMap == null || allocatorMap.isInvalidSharedMapFor(prototype)) {
             // The prototype map has changed since this function was last used as constructor.
             // Get a new allocator map.