Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8223

ES5: Object.freeze throws exception when run on a document

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.3.2
    • Component/s: JavaScript, Shell
    • Labels:
      None
    • ALL
    • Hide
      db.u.drop()
      db.u.insert({ a: 1 })
      var doc = db.u.findOne()
      Object.freeze(doc)
      

      throws error

      Thu Jan 17 15:18:55.316 javascript execution failed (shell):1 TypeError: Cannot call method 'isWritable' of undefined
      Object.freeze(doc)
             ^
      
      Show
      db.u.drop() db.u.insert({ a: 1 }) var doc = db.u.findOne() Object .freeze(doc) throws error Thu Jan 17 15:18:55.316 javascript execution failed (shell):1 TypeError: Cannot call method 'isWritable' of undefined Object .freeze(doc) ^

          Assignee:
          benjamin.becker Ben Becker
          Reporter:
          aheckmann Aaron Heckmann
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated:
            Resolved: