[SERVER-1477] Object.bsonsize({...}) Crashes Shell Created: 24/Jul/10  Updated: 12/Jul/16  Resolved: 25/Jul/10

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 1.5.6
Fix Version/s: 1.5.7

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

The last line crashes the shell.

MongoDB shell version: 1.5.6
connecting to: test
> Object.bsonsize(db.test1.findOne())
37
> Object.bsonsize("test")
Sat Jul 24 11:00:41 Error: bsonsize requires one valid object (shell):0
> Object.bsonsize({})
0
> Object.bsonsize(

{x:1}

)



 Comments   
Comment by auto [ 25/Jul/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: make Object.bsonsize work for regular js object SERVER-1477
http://github.com/mongodb/mongo/commit/5d7a159f5a78f64d2a6f0258cc0b4b55cf6203a3

Generated at Thu Feb 08 02:57:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.