JS Object builtin prototype is not thread safe

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • b96
    • generic
    • generic
    • Verified

      I have been chasing a failure that occurs very very rarely (twice since I started to work on npm few weeks ago).

      Concurrent call to Object.create in parallel with object instantiation makes the PropertyListenerManager of the builtin Object prototype to :
      1) handle removeNotificationListener when Object.create is called
      2) handle addNotificationListener for object literal.

      This is causing java.util.ConcurrentModificationException

      The list of listeners should be synchronized.

        1. thread.js
          0.5 kB
          Jean-Francois Denise
        2. fix.patch
          1.0 kB
          Jean-Francois Denise

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: