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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: JavaScript, Shell
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      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) ^

      Attachments

        Issue Links

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: