gecko-dev/dom/bindings
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
..
crashtests
docs
mozwebidlcodegen
parser Bug 1520509. Remove the unused support for CrossOriginWritable=InterfaceName in Web IDL. r=qdot 2019-01-18 22:11:04 +00:00
test Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
AtomList.h
BindingDeclarations.h Bug 1516366 - Move base classes from nsDocument to nsIDocument. r=smaug 2018-12-29 20:41:28 +01:00
BindingUtils.cpp Bug 1363208 part 4. Stop using cross-origin Xrays for WindowProxy. r=peterv,jandem 2019-01-21 03:30:31 +00:00
BindingUtils.h Bug 1363208 part 7. Change the Location binding to inherit from MaybeCrossOriginObject. r=peterv 2019-01-21 04:26:13 +00:00
Bindings.conf Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
CallbackFunction.h
CallbackInterface.cpp
CallbackInterface.h
CallbackObject.cpp Bug 1522350 - Move JS::ContextOptions{,Ref} to a new js/public/ContextOptions.h header to further slim jsapi.h. r=arai 2019-01-23 16:56:56 -08:00
CallbackObject.h Bug 1522350 - Move JS::ContextOptions{,Ref} to a new js/public/ContextOptions.h header to further slim jsapi.h. r=arai 2019-01-23 16:56:56 -08:00
Codegen.py Bug 1520509. Remove the unused support for CrossOriginWritable=InterfaceName in Web IDL. r=qdot 2019-01-18 22:11:04 +00:00
Configuration.py Bug 1363208 part 7. Change the Location binding to inherit from MaybeCrossOriginObject. r=peterv 2019-01-21 04:26:13 +00:00
DOMJSClass.h Bug 1517624 - Move JSPropertySpec and JSFunctionSpec definitions into a new js/public/PropertySpec.h header. r=arai 2019-01-03 15:37:01 -06:00
DOMJSProxyHandler.cpp
DOMJSProxyHandler.h Bug 1515999. Remove the unused JSContext argument from GetArrayIndexFromId. r=peterv 2018-12-26 13:45:15 -08:00
DOMString.h
Date.cpp
Date.h
ErrorIPCUtils.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
ErrorResult.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
Errors.msg Bug 1511401 part 4. Use CallArgs::requireAtLeast in the DOM. r=nbp,qdot 2018-12-10 14:13:06 -05:00
Exceptions.cpp Bug 1471989 - Clear JSStackFrame's JS object pointer when the window goes away. r=bzbarsky 2018-12-19 19:42:04 +00:00
Exceptions.h
FakeString.h
GenerateCSS2PropertiesWebIDL.py
IterableIterator.cpp
IterableIterator.h
JSSlots.h
Makefile.in
NonRefcountedDOMObject.h
Nullable.h
PrimitiveConversions.h
ReadableStream.h
Record.h
RemoteObjectProxy.cpp Bug 1363208 part 2. Add a helper class for implementing the HTML requirements for cross-origin-accessible objects. r=jandem,peterv 2019-01-21 03:28:06 +00:00
RemoteObjectProxy.h Bug 1363208 part 2. Add a helper class for implementing the HTML requirements for cross-origin-accessible objects. r=jandem,peterv 2019-01-21 03:28:06 +00:00
RootedDictionary.h
RootedOwningNonNull.h
RootedRefPtr.h
SimpleGlobalObject.cpp Bug 1513108 - Remove the separate class extension hook for getting a weakmap key delegate, r=jonco 2018-12-07 14:38:01 -08:00
SimpleGlobalObject.h
SpiderMonkeyInterface.h
StructuredClone.cpp
StructuredClone.h
ToJSValue.cpp Bug 1517415. We might be trying to JS-wrap a BrowsingContext with a torn-down-enough docshell that we have no window. r=nika 2019-01-03 20:31:05 +00:00
ToJSValue.h Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky 2019-01-02 13:27:05 +00:00
TypedArray.h
UnionMember.h
WebIDLGlobalNameHash.cpp
WebIDLGlobalNameHash.h
XrayExpandoClass.h
mach_commands.py
moz.build Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky 2019-01-02 13:29:18 +00:00
nsIScriptError.idl
nsScriptError.cpp Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky 2019-01-02 13:29:18 +00:00
nsScriptError.h Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky 2019-01-02 13:29:18 +00:00
nsScriptErrorWithStack.cpp