Align bsonObjToArray ownership semantics with bsonGetImmutable

XMLWordPrintableJSON

    • Query Integration
    • Fully Compatible
    • v8.3, v8.2, v8.0, v7.0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      bsonObjToArray and bsonGetImmutable are sibling functions in the MozJS BSON binding layer. bsonGetImmutable ensures the BSONObj it works with is owned before creating JS wrappers around it;  bsonObjToArray does not apply the same treatment. This inconsistency can lead to incorrect behaviour when operating on sub-document wrappers. Bring bsonObjToArray in line with the established pattern used by bsonGetImmutable.

            Assignee:
            Lee Maguire
            Reporter:
            Lee Maguire
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: