Bug 1530104: Correct documentation for newGlobal JS shell function. r=jorendorff
authorJim Blandy <jimb@mozilla.com>
Mon, 25 Feb 2019 18:54:25 +0000
changeset 518902 d69f9928a349d8b6c8bdccb2f689f3171ed293d5
parent 518895 faec87a80ed1e4f50a7961b4dd652a682ef339ce
child 518903 eec82a970303374d6aab0430050016d20fe20ab9
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1530104
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530104: Correct documentation for newGlobal JS shell function. r=jorendorff This clarifies the descriptions of newCompartment, sameCompartmentAs, and sameZoneAs. Differential Revision: https://phabricator.services.mozilla.com/D20910
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -8455,26 +8455,27 @@ JS_FN_HELP("parseBin", BinParse, 1, 0,
 "  Decompile the currently executing script."),
 
     JS_FN_HELP("thisFilename", ThisFilename, 0, 0,
 "thisFilename()",
 "  Return the filename of the current script"),
 
     JS_FN_HELP("newGlobal", NewGlobal, 1, 0,
 "newGlobal([options])",
-"  Return a new global object in a new realm. If options\n"
-"  is given, it may have any of the following properties:\n"
-"\n"
-"      sameZoneAs: The compartment will be in the same zone as the given\n"
-"         object (defaults to a new zone).\n"
-"      sameCompartmentAs: The global will be in the same compartment and\n"
-"         zone as the given object (defaults to the current compartment,\n"
-"         unless the --more-compartments option is used).\n"
+"  Return a new global object/realm. The new global is created in the\n"
+"  'newGlobal' function object's compartment and zone, unless the\n"
+"  '--more-compartments' command-line flag was given, in which case new\n"
+"  globals get a fresh compartment and zone. If options is given, it may\n"
+"  have any of the following properties:\n"
+"      sameCompartmentAs: If an object, the global will be in the same\n"
+"         compartment and zone as the given object.\n"
+"      sameZoneAs: The global will be in a new compartment in the same zone\n"
+"         as the given object.\n"
 "      newCompartment: If true, the global will always be created in a new\n"
-"         compartment, even without --more-compartments.\n"
+"         compartment and zone.\n"
 "      cloneSingletons: If true, always clone the objects baked into\n"
 "         scripts, even if it's a top-level script that will only run once\n"
 "         (defaults to using them directly in scripts that will only run\n"
 "         once).\n"
 "      invisibleToDebugger: If true, the global will be invisible to the\n"
 "         debugger (default false)\n"
 "      disableLazyParsing: If true, don't create lazy scripts for functions\n"
 "         (default false).\n"