Граф коммитов

60 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 3af8c4138c Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-08-17 20:20:50 +00:00
Dorel Luca 990d081d9f Backed out 2 changesets (bug 1651519) for WPT failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 7b973a0e7be9 (bug 1651519)
Backed out changeset 55e9184c5617 (bug 1651519)
2020-07-22 02:47:34 +03:00
Kris Maglione e7d942c77f Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 19:02:27 +00:00
Dorel Luca d91c6dc40b Backed out 2 changesets (bug 1651519) for wpt failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 52317abc5c68 (bug 1651519)
Backed out changeset 45448dca59a4 (bug 1651519)
2020-07-21 21:55:57 +03:00
Kris Maglione 9c2c147159 Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 16:59:28 +00:00
Kris Maglione 9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Ian Moody 011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Mark Banner 351d147e2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44149

--HG--
extra : moz-landing-system : lando
2019-09-02 11:22:27 +00:00
soniasingla f52cea06ac Bug 1556849 - Enable ESLint for dom/base/. r=Standard8,mccr8
# ignore-this-changeset

These are all automatic changes via ESLint/prettier.

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

--HG--
extra : moz-landing-system : lando
2019-07-15 17:22:45 +00:00
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
Kris Maglione 2fe0de01dc Bug 1519596: Part 1 - Remove several unnecessary/unused ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16377

--HG--
extra : rebase_source : 6c4311387d25de425806aeb6c4691e12c9fcb855
2019-01-11 16:59:23 -08:00
Boris Zbarsky 1312fcd10f Bug 1476145 part 5. Stop using getInterface(nsIDOMWindowUtils) in DOM code. r=mccr8 2018-07-24 19:47:41 -04:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Peter Van der Beken f5754d679a Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : 5911f91bd7a63cd3603494e087e3858bd0527500
2018-03-01 20:19:56 +01:00
Sebastian Hengst 3a10644021 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)

--HG--
extra : histedit_source : 791b22f6770f4fead2f909478a93d65d85829fe0%2Cbb387309e90f53e1dde45dcf8cf4ebedcc6e5c5e
2018-03-01 11:51:09 +02:00
Peter Van der Beken 6cf0e1c871 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : f6f781b04923f67f60718706a78b3c4de15eca94
2018-02-22 20:22:29 +01:00
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Dorel Luca 9b2f91981c Backed out 6 changesets (bug 888600) for Valgrind and build bustge on a CLOSED TREE
Backed out changeset 7c8317f4ad48 (bug 888600)
Backed out changeset 5b990735f1ad (bug 888600)
Backed out changeset 9eafe225b804 (bug 888600)
Backed out changeset 16af80d6cd93 (bug 888600)
Backed out changeset a109987af625 (bug 888600)
Backed out changeset 0949dba396ad (bug 888600)
2018-02-22 13:56:43 +02:00
Peter Van der Beken ab910ec03f Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : 05d1b150ffa84931ace6dbd66385d1d014a03afe
2017-11-23 16:27:27 +01:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Florian Queze 4b1556a5f2 Bug 1355056 - replace (function(args) { /* do stuff using this */ }).bind(this) with arrow functions, r=jaws. 2017-04-27 00:25:45 +02:00
Nick Robson 40e1ba271a Bug 904479 - Added createPromiseWithId() that returns id of resolver r=kanru,nsm
--HG--
extra : rebase_source : 2aae82958670d0154a3cf08bd0e2a80d529e36f3
2015-08-19 14:53:22 -07:00
Kyle Machulis efd982b9e9 Bug 1073259 - Print more descriptive errors when DOMRequestHelper tries to create a request with an invalid window. r=fabrice 2014-10-17 05:24:00 -04:00
Nicholas Nethercote 5227147d52 Bug 1039887 - Avoid unnecessary deletes in DOMRequestHelper.jsm. r=fabrice.
They're unnecessary because the entire object is later nulled out.

This in turn avoids creating 3,108 shapes when starting up B2G, which is about
73 KiB's worth.
2014-07-16 22:48:53 -07:00
Henry Chang 21482a5e3c Bug 1035074 - Fix DOMRequestHelper::destroyDOMRequestHelper logic error. r=gene, fabrice, ferjm. 2014-07-11 15:22:18 +08:00
Antonio M. Amaya f32ee8177c Bug 1026737 - Implement listener counting on DOMRequestHelper r=fabrice 2014-06-19 19:51:05 -07:00
Fernando Jiménez 259e59d6fb Bug 928389 - Default to strong listeners added via DOMRequestHelper. r=fabrice, genelian, bkelly 2013-12-02 21:39:04 +01:00
Fabrice Desré 2d148375b6 Bug 938023 - Implement the download API : Part 2, implementation. r=auswerk 2013-11-27 23:18:08 -08:00
Ben Kelly be6feb0cd2 Bug 924565: Part 2: Use weak observer reference for DOMRequestHelper. r=fabrice 2013-11-20 13:33:18 +08:00
Fernando Jiménez 3440938223 Bug 924971 - [Contacts] Trying to add a contact as a recipient opens contact details instead of returning to Messages app. r=fabrice 2013-10-18 12:58:24 +02:00
Fernando Jiménez 05c17fe7c6 Bug 927398 - Missing call to .uninit() in DOMRequestHelper. r=fabrice 2013-10-18 12:58:24 +02:00
Steve Fink 35c9c98fac Backed out changeset 5349c5c0d9f8 (bug 924971) for M-oth failures
Backed out from a CLOSED TREE
2013-10-17 15:52:51 -07:00
Steve Fink 04787800bf Backed out changeset 03b50ae14f9b (bug 927398) for M-oth failures
Backed out from a CLOSED TREE
2013-10-17 15:52:46 -07:00
Fernando Jiménez 53ea380b80 Bug 927398 - Missing call to .uninit() in DOMRequestHelper. r=fabrice 2013-10-17 22:29:59 +02:00
Fernando Jiménez b206e0b490 Bug 924971 - [Contacts] Trying to add a contact as a recipient opens contact details instead of returning to Messages app. r=fabrice 2013-10-17 22:29:59 +02:00
Fernando Jiménez 1bd2567c1f Bug 915598 - Allow strong references to DOMRequestIPCHelper message listeners. Part 1: DOMRequestHelper. r=fabrice 2013-10-04 23:59:48 +02:00
Andrea Marchesini fcc425445c Bug 911213 - Implement new promise constructor, r=bz 2013-09-11 18:03:04 +02:00
Kan-Ru Chen (陳侃如) aee7017ffe Bug 904333 - Add forEach{Request,PromiseResolver} method to DOMRequestIpcHelper r=fabrice
--HG--
extra : rebase_source : 181aead1356a73a5a8a85c98000f3375c751ee33
2013-08-13 13:07:03 +08:00
Nikhil Marathe 9e3af62753 Bug 902030 - DOMRequestIpcHelper stores/retrieves Promises too. r=fabrice
--HG--
extra : rebase_source : 4610af506cc1e15f8f2efdc682e3d7989626cebf
2013-08-09 18:11:11 -07:00
Fabrice Desré 30970c47d5 Bug 902362 - DOMRequestHelper specifies _requests as array, but should be object. r=fabrice 2013-08-09 09:32:02 -07:00
Justin Lebar 55ca3347cf Bug 900221 - Switch DOMRequestHelper over to using weak message listeners. rs=fabrice
--HG--
extra : rebase_source : d83eb49444d8fb598e9d7ed1a879a6cbc8f3baaf
2013-08-08 11:36:56 -07:00
Nikhil Marathe 9fe05651ec Bug 892647 - Add check to DOMRequestIpcHelperMessageListener.destroy() to take actions only once. r=jlebar
--HG--
extra : rebase_source : 08b9f74879863ecfb0f5847b3854d28b67ec1f85
2013-07-11 17:13:42 -04:00
Justin Lebar 779d96d10f Bug 889984 - Don't leak objects which "inherit" from DOMRequestIpcHelper the associated window is closed. r=fabrice 2013-07-08 17:55:42 -04:00
Benjamin Chen b38f788032 Bug 802564 - Can't set window.location in inline disposition web activity when its App frame is opened. r=fabrice
1. SystemMessageInternal: Handle the "_listeners" correctly by using "manifest" and "winID"
2. SystemMessageManager: Remove cpmm message listerners when receiving "inner-window-destroyed"; Add winID for the reg/unreg message.
3. DOMRequestIpcHelper: Check aTopic in observe method
2012-11-07 10:32:09 +08:00
Kyle Huey 0469a02b25 Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon
--HG--
extra : rebase_source : 98337b6a8c07d05e8c961a452dd05a7d75c3c60b
2012-10-31 09:13:28 -07:00