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

Differences in argument validation of custom types between v8 and Spidermonkey

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.5.1
    • Affects Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • ALL

      DBRef():

      v8:

      > DBRef()
      DBRef(undefined, undefined)
      

      Spidermonkey:

      > DBRef()
      Tue Mar 12 18:15:20.990 Error: DBRef takes 2 arguments -- DBRef($ref,$id) (shell):1
      

      BinData():

      v8:

      > BinData()
      BinData(0,"")
      > new BinData()
      BinData(0,"")
      

      Spidermonkey:

      > BinData()
      Tue Mar 12 18:16:53.444 Error: BinData takes 2 arguments -- BinData(subtype,data) (shell):1
      > new BinData()
      Tue Mar 12 18:16:54.636 Error: BinData takes 2 arguments -- BinData(subtype,data) (shell):1
      

      DBPointer argument checking:

      v8:

      > DBPointer("ns",0)
      DBPointer("ns", 0)
      > DBPointer("ns","test")
      DBPointer("ns", "test")
      

      Spidermonkey:

      > DBPointer("ns",0)
      Tue Mar 12 18:17:52.499 Error: 2nd argument to DBPointer must be objectId (shell):1
      > DBPointer("ns","test")
      Tue Mar 12 18:17:55.506 Error: 2nd argument to DBPointer must be objectId (shell):1
      

            Assignee:
            sverch Shaun Verch
            Reporter:
            sverch Shaun Verch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: