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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • 2.3.2
    • None
    • 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) ^

    Attachments

      Issue Links

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: