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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.3.2
    • Component/s: JavaScript, Shell
    • 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) ^
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

            Assignee:
            Ben Becker (Inactive)
            Reporter:
            Aaron Heckmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: