Skip to content

Commit c63011d

Browse files
author
Sam Kleinman
committed
DOCS-981: edits
1 parent 4db57b6 commit c63011d

File tree

1 file changed

+41
-40
lines changed

1 file changed

+41
-40
lines changed

source/release-notes/2.4.txt

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -644,23 +644,23 @@ The primary impacts of the switch to V8 are:
644644

645645
- concurrency improvements,
646646
- modernized JavaScript implementation, and
647-
- removal of non-standard Spidermonkey features.
647+
- removal of non-standard SpiderMonkey features.
648648

649-
Concurrency Improvements
650-
````````````````````````
649+
Improved Concurrency
650+
````````````````````
651651

652652
Previously, MongoDB operations that required the JavaScript interpreter
653653
had to acquire a lock, and a single :program:`mongod` could only run a
654654
single JavaScript operation at a time. The switch to V8 improves
655-
concurrency by allowing each JavaScript operation to run on a separate
656-
core.
655+
concurrency by permiting multiple JavaScript operations to run at the
656+
same time.
657657

658658
Modernized JavaScript Implementation (ES5)
659659
``````````````````````````````````````````
660660

661661
The 5th edition of `ECMAscript
662662
<http://www.ecma-international.org/publications/standards/Ecma-262.htm>`_,
663-
abbreviated as ES5, adds many new language features, such as:
663+
abbreviated as ES5, adds many new language features, including:
664664

665665
- standardized `JSON
666666
<http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.1>`_,
@@ -672,9 +672,9 @@ abbreviated as ES5, adds many new language features, such as:
672672
<http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.4.5>`_,
673673

674674
- `array extensions
675-
<http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.16>`_,
675+
<http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.16>`_, and
676676

677-
- getters/setters and much more.
677+
- getters and setters.
678678

679679
With V8, MongoDB supports the latest standardized version of JavaScript
680680
with the following exceptions. The following features do not work as expected
@@ -688,12 +688,13 @@ on documents returned from MongoDB queries:
688688

689689
- enumerable properties.
690690

691-
Removal of Non-standard Spidermonkey Features
692-
`````````````````````````````````````````````
691+
Removed Non-standard SpiderMonkey Features
692+
``````````````````````````````````````````
693693

694-
V8 does **not** support the following *non-standard* `Spidermonkey
694+
V8 does **not** support the following *non-standard* `SpiderMonkey
695695
<https://developer.mozilla.org/en-US/docs/SpiderMonkey>`_ JavaScript
696-
extensions.
696+
extensions, previously supported by MongoDB's use of SpiderMonkey as
697+
its JavaScript engine.
697698

698699
E4X Extensions
699700
^^^^^^^^^^^^^^
@@ -754,7 +755,7 @@ V8 does not support ``InternalError()``. Use ``Error()`` instead.
754755
^^^^^^^^^^^^^^^^^^^^^^^^^^^
755756

756757
V8 does not support the use of `for each...in
757-
<https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Statements/for_each...in>`_
758+
<https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Statements/for_each...in>`_
758759
construct. Use ``for (var x in y)`` construct
759760
instead.
760761

@@ -793,16 +794,16 @@ instead.
793794
print(value);
794795
});
795796

796-
Array comprehensions
797-
^^^^^^^^^^^^^^^^^^^^
797+
Array Comprehension
798+
^^^^^^^^^^^^^^^^^^^
798799

799800
V8 does not support `Array comprehensions
800801
<https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Predefined_Core_Objects#Array_comprehensions>`_.
801802

802803
Use other methods such as the ``Array`` instance methods ``map()``,
803804
``filter()``, or ``forEach()``.
804805

805-
.. example::
806+
.. example::
806807

807808
With V8, the following array comprehension is **invalid**:
808809

@@ -840,7 +841,7 @@ Multiple Catch Blocks
840841
V8 does not support multiple ``catch`` blocks and will throw a
841842
``SyntaxError``.
842843

843-
.. example::
844+
.. example::
844845

845846
The following multiple catch blocks is **invalid** with V8 and will
846847
throw ``"SyntaxError: Unexpected token if"``:
@@ -855,17 +856,17 @@ V8 does not support multiple ``catch`` blocks and will throw a
855856
print('standard error')
856857
}
857858

858-
Conditional Function Definitions
859-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
859+
Conditional Function Definition
860+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
860861

861-
V8 will produce different outcomes than Spidermonkey with `conditional
862+
V8 will produce different outcomes than SpiderMonkey with `conditional
862863
function definitions
863864
<https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Functions>`_.
864865

865866
.. example::
866867

867868
The following conditional function definition produces different
868-
outcomes in Spidermonkey versus V8:
869+
outcomes in SpiderMonkey versus V8:
869870

870871
.. code-block:: javascript
871872

@@ -876,12 +877,12 @@ function definitions
876877
print(typeof go)
877878
}
878879

879-
With Spidermonkey, the conditional function outputs ``undefined``,
880+
With SpiderMonkey, the conditional function outputs ``undefined``,
880881
whereas with V8, the conditional function outputs ``function``.
881882

882883
If your code defines functions this way, it is highly recommended
883884
that you refactor the code. The following example refactors the
884-
conditional function definition to work in both Spidermonkey and V8.
885+
conditional function definition to work in both SpiderMonkey and V8.
885886

886887
.. code-block:: javascript
887888

@@ -893,7 +894,7 @@ function definitions
893894
print(typeof go)
894895
}
895896

896-
The refactored code outputs ``undefined`` in both Spidermonkey and V8.
897+
The refactored code outputs ``undefined`` in both SpiderMonkey and V8.
897898

898899
.. note::
899900

@@ -911,8 +912,8 @@ function definitions
911912
}
912913
}
913914

914-
The JavaScript code throws ``SyntaxError: In strict mode code,
915-
functions can only be declared at top level or immediately within
915+
The JavaScript code throws ``SyntaxError: In strict mode code, you
916+
may only declare functions at top level or immediately within
916917
another function.``
917918

918919
String Generic Methods
@@ -923,7 +924,7 @@ V8 does not support `String generics
923924
String generics are a set of methods on the ``String`` class that
924925
mirror instance methods.
925926

926-
.. example::
927+
.. example::
927928

928929
The following use of the generic method
929930
``String.toLowerCase()`` is **invalid** with V8:
@@ -959,7 +960,7 @@ With V8, use the ``String`` *instance* methods instead of following
959960

960961
* - ``String.concat()``
961962
- ``String.search()``
962-
- ``String.toLowerCase()``
963+
- ``String.toLowerCase()``
963964

964965
* - ``String.endsWith()``
965966
- ``String.slice()``
@@ -983,10 +984,10 @@ With V8, use the ``String`` *instance* methods instead of following
983984

984985
.. _array-generics:
985986

986-
Array Generics
987-
^^^^^^^^^^^^^^
987+
Array Generic Methods
988+
^^^^^^^^^^^^^^^^^^^^^
988989

989-
V8 does not support `Array generics
990+
V8 does not support `Array generic methods
990991
<https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array#Array_generic_methods>`_.
991992
Array generics are a set of methods on the ``Array`` class that mirror
992993
instance methods.
@@ -1014,7 +1015,7 @@ instance methods.
10141015

10151016
var allEven = arr.every(isEven);
10161017
print(allEven);
1017-
1018+
10181019
With V8, use the ``Array`` *instance* methods instead of the following
10191020
*generic* methods:
10201021

@@ -1025,7 +1026,7 @@ With V8, use the ``Array`` *instance* methods instead of the following
10251026
- ``Array.slice()``
10261027

10271028
* - ``Array.every()``
1028-
- ``Array.map()``
1029+
- ``Array.map()``
10291030
- ``Array.some()``
10301031

10311032
* - ``Array.filter()``
@@ -1056,11 +1057,11 @@ Use the ``Array`` instance method ``toString()`` instead.
10561057

10571058
V8 does not support the non-standard method ``uneval()``. Use the
10581059
standardized `JSON.stringify()
1059-
<https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify>`_
1060+
<https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify>`_
10601061
method instead.
10611062

1062-
``Map-Reduce`` and ``$where``
1063-
``````````````````````````````````````
1063+
Additional Limitations for ``Map-Reduce`` and ``$where``
1064+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10641065

10651066
In MongoDB 2.4, :doc:`map-reduce operations
10661067
</applications/map-reduce>`, the :command:`group` command, and
@@ -1084,14 +1085,14 @@ in MongoDB 2.4:
10841085

10851086
* - Available Properties
10861087
- Available Functions
1087-
-
1088+
-
10881089

1089-
* -
1090+
* -
10901091
| ``args``
10911092
| ``MaxKey``
10921093
| ``MinKey``
10931094

1094-
-
1095+
-
10951096
| ``assert()``
10961097
| ``BinData()``
10971098
| ``DBPointer()``
@@ -1106,7 +1107,7 @@ in MongoDB 2.4:
11061107
| ``ISODate()``
11071108
| ``isString()``
11081109

1109-
-
1110+
-
11101111
| ``Map()``
11111112
| ``MD5()``
11121113
| ``NumberInt()``

0 commit comments

Comments
 (0)