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

1078 Коммитов

Автор SHA1 Сообщение Дата
Frederic Wang 79e3532d7f Bug 1783998 - Remove MathML preference script_shift_attributes. r=emilio
- Remove script_shift_attributes preference and related test, warning
  message and parsing.
- Do not remove subscriptshift/supscripshift atoms, since they are
  still needed for nsTreeSanitizer.

Differential Revision: https://phabricator.services.mozilla.com/D154195
2022-08-25 09:03:58 +00:00
Frederic Wang 3c65c69660 Bug 1783995 - Remove MathML preference deprecated_menclose_notation_radical. r=emilio
- Remove the preference and corresponding tests.
- nsMathMLmencloseFrame continues to implement the radical notation for
  now, since it's still used by nsMathMLmsqrtFrame. Ideally, we should
  refactor our code so that msqrt/mroot share the same implementation.

Differential Revision: https://phabricator.services.mozilla.com/D154194
2022-08-15 08:55:50 +00:00
Tom Schuster 34c8b152df Bug 1779184 - Start rewrite of Sanitizer API for elements. r=emilio
There are still a lot of TODOs, but I want to make some incremental progress on this.

Differential Revision: https://phabricator.services.mozilla.com/D152271
2022-08-08 09:23:55 +00:00
Tom Schuster 0610723e31 Bug 1529337 - Implement CSP 'script-src-elem' and 'script-src-attr' directives. r=freddyb,webidl,smaug,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D150965
2022-08-01 12:32:58 +00:00
smolnar bd8c576702 Backed out 2 changesets (bug 1529337) for awaiting decision on implementing other CSP 3 features
Backed out changeset 12cd014c46e8 (bug 1529337)
Backed out changeset f1489d7cf1a1 (bug 1529337)
2022-07-18 11:09:25 +03:00
Kagami Sascha Rosylight cdb7d00f1e Bug 1354500 - Part 2: Remove IDBDatabase#storage r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D151417
2022-07-15 01:55:26 +00:00
Tom Schuster e8d99d0ef6 Bug 1529337 - Implement CSP 'script-src-elem' and 'script-src-attr' directives. r=freddyb,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D150965
2022-07-13 10:21:48 +00:00
Jon Coppeard 3e69adc940 Bug 1777450 - Separate error messages for module resulution failure when the specifier might be bare r=allstarschh,flod
This fixes the original case by adding an extra error reason which is used when
the specifier could be bare and and only warning about relative URLs in this
case.

The same problem happens with import maps enable where "./foo.js" produces an
error about it being a bare specifier, which it's not. For that case make
ParseURLLikeImportSpecifier return a ResolveResult and use the same approach.

Differential Revision: https://phabricator.services.mozilla.com/D151153
2022-07-08 09:58:33 +00:00
Tom Schuster 3b08086654 Bug 1773667 - Add console logging for file:// script loads. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D148899
2022-06-13 08:02:13 +00:00
Mathew Hodson 097d33e519 Bug 1765063 - Disable mozCurrentTransform on early beta and earlier. r=lsalzman,gfx-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D143873
2022-05-19 01:07:54 +00:00
Eitan Isaacson f2c37a12b2 Bug 1564997 - Clean up AccessFu.properties. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D146354
2022-05-17 18:52:14 +00:00
Yoshi Cheng-Hao Huang 8a939e5954 Bug 1688879 - Part 5: ResolveModuleSpecifier for import maps. r=jonco,yulia,flod
Implement https://wicg.github.io/import-maps/#resolve-a-module-specifier

Differential Revision: https://phabricator.services.mozilla.com/D142072
2022-05-05 21:19:02 +00:00
Yoshi Cheng-Hao Huang 464384bf31 Bug 1688879 - Part 3: Parse and register an import map. r=jonco,yulia
Implement
https://wicg.github.io/import-maps/#parse-an-import-map-string,
and
https://wicg.github.io/import-maps/#register-an-import-map

Differential Revision: https://phabricator.services.mozilla.com/D142071
2022-05-05 21:19:01 +00:00
Butkovits Atila fb9f362af3 Backed out 11 changesets (bug 1688879) for causing build bustages. CLOSED TREE
Backed out changeset 350ddd17c7f5 (bug 1688879)
Backed out changeset 27984b95ed20 (bug 1688879)
Backed out changeset 6a5bb063965f (bug 1688879)
Backed out changeset d8edcfdb504b (bug 1688879)
Backed out changeset 77ab231310ec (bug 1688879)
Backed out changeset c2bce95a1aca (bug 1688879)
Backed out changeset f5862572ced8 (bug 1688879)
Backed out changeset 05e0a1bf32fc (bug 1688879)
Backed out changeset adeab05b7419 (bug 1688879)
Backed out changeset 0e60834e17e5 (bug 1688879)
Backed out changeset 877bb4c2ce66 (bug 1688879)
2022-05-05 19:52:05 +03:00
Yoshi Cheng-Hao Huang 098e1668c8 Bug 1688879 - Part 5: ResolveModuleSpecifier for import maps. r=jonco,yulia,flod
Implement https://wicg.github.io/import-maps/#resolve-a-module-specifier

Differential Revision: https://phabricator.services.mozilla.com/D142072
2022-05-05 16:03:17 +00:00
Yoshi Cheng-Hao Huang 48be9bcaa2 Bug 1688879 - Part 3: Parse and register an import map. r=jonco,yulia
Implement
https://wicg.github.io/import-maps/#parse-an-import-map-string,
and
https://wicg.github.io/import-maps/#register-an-import-map

Differential Revision: https://phabricator.services.mozilla.com/D142071
2022-05-05 16:03:16 +00:00
Narcis Beleuzu a92a200e76 Backed out 9 changesets (bug 1688879) for bustages on ImportMap.cpp
Backed out changeset 44e9abe72a5e (bug 1688879)
Backed out changeset 0503d2d2ae01 (bug 1688879)
Backed out changeset 2cf08a51b184 (bug 1688879)
Backed out changeset 6f0276c3ab0e (bug 1688879)
Backed out changeset f16b14d8f677 (bug 1688879)
Backed out changeset 03b772e02d07 (bug 1688879)
Backed out changeset 39ed48a5ecc2 (bug 1688879)
Backed out changeset d7b42d8312bb (bug 1688879)
Backed out changeset 5e695bf5dd0d (bug 1688879)
2022-05-05 03:41:31 +03:00
Yoshi Cheng-Hao Huang 45ae7f8cf1 Bug 1688879 - Part 5: ResolveModuleSpecifier for import maps. r=jonco,yulia,flod
Implement https://wicg.github.io/import-maps/#resolve-a-module-specifier

Differential Revision: https://phabricator.services.mozilla.com/D142072
2022-05-04 21:02:51 +00:00
Yoshi Cheng-Hao Huang d9207c7020 Bug 1688879 - Part 3: Parse and register an import map. r=jonco,yulia
Implement
https://wicg.github.io/import-maps/#parse-an-import-map-string,
and
https://wicg.github.io/import-maps/#register-an-import-map

Differential Revision: https://phabricator.services.mozilla.com/D142071
2022-05-04 21:02:50 +00:00
James Teh ddd6d00a57 Bug 1395181 part 1: Support "click ancestor" action on descendants when an ancestor has an action. r=eeejay
Previously, we supported an action on text leaf and image accessibles if an ancestor was a link or was clickable.
However, we didn't support it on any other kind of descendant, nor could clients differentiate between a click handler on the descendant itself vs an action propagated because of an ancestor.
In addition, the click was performed on the ancestor element itself, rather than bubbling up to the ancestor.
This was probably never a real problem given the limited scope, but it meant that the actual event target was lost.

This has been replaced by a "click ancestor" action supported on all descendants of ancestors providing an action.
The click is dispatched to the descendant and bubbles up to the ancestor.
Aside from consistency and the ability to differentiate the action, this allows clients to stop relying on simulating clicks themselves to directly target a descendant.
This avoids problems caused by obscured web elements, obscured browser windows and other weird screen coordinate issues.
It thus fixes several problems reported by NVDA screen reader users.

Differential Revision: https://phabricator.services.mozilla.com/D144252
2022-04-22 23:13:36 +00:00
Paul Zuehlcke 68b4cc3fce Bug 1735746 - Log an error message to the web console for blocked external protocol navigation from sandbox. r=ckerschb
Depends on D141132

Differential Revision: https://phabricator.services.mozilla.com/D141133
2022-04-20 11:06:50 +00:00
Butkovits Atila 393fc50e58 Backed out 4 changesets (bug 1735746) for causing failures at browser_protocol_custom_sandbox.js. CLOSED TREE
Backed out changeset 703dfd92c775 (bug 1735746)
Backed out changeset 3b06ed08d93b (bug 1735746)
Backed out changeset 9968278b9efe (bug 1735746)
Backed out changeset 49f2e283115d (bug 1735746)
2022-04-05 16:04:29 +03:00
Paul Zuehlcke 216bf2aef3 Bug 1735746 - Log an error message to the web console for blocked external protocol navigation from sandbox. r=ckerschb
Depends on D141132

Differential Revision: https://phabricator.services.mozilla.com/D141133
2022-04-05 11:31:54 +00:00
Emilio Cobos Álvarez 881f8f938a Bug 1762109 - Make the XLink setup a bit saner. r=smaug
Make Link and SVGAElement agree on XLink handling, and make it more
explicit that SVGAElement needs to be a bit more special for SMIL.

Remove dead MathML XLink code.

Differential Revision: https://phabricator.services.mozilla.com/D142546
2022-03-31 14:33:57 +00:00
Luca Greco e87787c7a6 Bug 1754441 - Add an explicit deprecation warning on InstallTrigger. r=mixedpuppy,emilio
Differential Revision: https://phabricator.services.mozilla.com/D138302
2022-03-18 20:02:54 +00:00
Emilio Cobos Álvarez 68df4e4714 Bug 1753233 - Add missing bad input messages for datetime types. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D138785
2022-02-15 17:39:17 +00:00
Dana Keeler b543bb3a2a Bug 1750089 - remove weak certificate signature error console message r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D135943
2022-01-19 21:24:47 +00:00
Iulian Moraru d8fce573b5 Backed out 2 changesets (bug 1750089) for causing mochitest failures on browser_webconsole_certificate_messages.js.
Backed out changeset 7ebb345a9293 (bug 1750089)
Backed out changeset 40bd1975208d (bug 1750089)
2022-01-19 04:07:44 +02:00
Dana Keeler e8ae7a370c Bug 1750089 - remove weak certificate signature error console message r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D135943
2022-01-18 23:54:12 +00:00
Kagami Sascha Rosylight f57759070e Bug 1500343 - Deprecate IDBDatabase.createMutableFile and IDBMutableFile.open r=janv,dom-storage-reviewers,emilio
This replaces the previous `[UseCounter]`s with `[Deprecated]`s, since the latter also collects use counters.

Differential Revision: https://phabricator.services.mozilla.com/D135070
2022-01-05 19:01:07 +00:00
Andrew Osmond fed82ae54b Bug 1736177 - Part 3. Update OffscreenCanvas WebIDL to be more current. r=dom-worker-reviewers,jgilbert,smaug
Differential Revision: https://phabricator.services.mozilla.com/D130779
2021-12-10 02:57:52 +00:00
Csoregi Natalia 1c7cae16d7 Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond b766347f3a Bug 1736177 - Part 3. Update OffscreenCanvas WebIDL to be more current. r=dom-worker-reviewers,jgilbert,smaug
Differential Revision: https://phabricator.services.mozilla.com/D130779
2021-12-09 19:25:24 +00:00
Henri Sivonen 649a5b63d8 Bug 1701828 - meta charset rewrite. r=smaug
Implements https://github.com/whatwg/html/issues/6962 . Improves performance
when <meta charset> occurs in head but after the first kilobyte and aligns
behavior better with WebKit and Blink.

The main change is to avoid reloads when meta appears within head but
after the first kilobyte. Prior to this change, Gecko reloaded in that
case (in compliance with the spec!) even though WebKit and Blink did not.

Differences from WebKit and Blink:

* WebKit and Blink honor <meta charset> in <noscript>. This implementation
  does not.
* WebKit and Blink look for meta as if the tree builder was unaware of
  foreign content. This implementation is foreign content-aware. This
  makes a difference for CDATA sections that contain a > before the meta
  as well as style and script elements within foreign content. This could
  happen if the CDATA section that has mysteriously been introduced around
  a what looks like a meta tag also contains another prior tag-looking
  run of text.
* This implementation processes rel=preload and speculative loads that are
  seen before <meta charset> has been seen. WebKit and Blink instead first
  look for the meta and rewind before starting speculative parsing.
* Unlike WebKit, if there is neither an honored meta nor syntax resembling
  an XML declaration, detection from content takes place (as in Blink).
* Unlike Blink, if there is neither an honored meta nor syntax resembling
  an XML declaration, the detection from content is not dependent of network
  buffer boundaries.
* Unlike Blink, detection from content can trigger a reload at the end of
  the stream if the guess made at that point differs from the first guess.
  (See below for the definition of the input to the first guess.)

Differences from the old spec and Gecko previously:

* Meta inside script and RCDATA elements is no longer honored.
* Late meta is now ignored and no longer triggers a reload.
* Later meta counts as early enough meta: In addition to the previous
  meta within the first 1024 bytes, now a meta that started within the first
  1024 bytes counts as early enough. Additionally, if by then there hasn't
  been a template start tag and head hasn't ended, meta occurring before the
  earlier of the end of the head or a template start tag counts as early
  enough.
* Meta now counts as not-late even if the encoding label has numeric
  character reference escapes.
* Syntax resembling an XML declaration longer than a kilobyte is honored if
  there is no honored meta.
* If there is neither an honored meta nor syntax resembling an XML declaration,
  the initial chardetng scan is potentially longer than before: the first 1024
  bytes, the token spanning the 1024-byte boundary if there is such a token,
  and, if by then head hasn't ended and there hasn't been a template start tag
  until the end of the template start tag or the end of the token that causes
  head to end, ever comes first. However, if the token implying the end of the
  head is a text token, bytes only to the end of the previous non-text token is
  considered. (This definition avoids depending on network buffer boundaries.)
* XML View Source now uses the code for syntax resembling an XML declaration
  instead of expat for extracting the internal encoding label.

Reftest are added as both WPT and Gecko reftests in order to test both http:
and file: URL scenarios. The Gecko tests retain the WPT <link> tags in order
to use the exact same bytes.

An encoding declaration has been added to a number of old tests that didn't
intend to test the new speculation behavior especially in the context of
https://bugzilla.mozilla.org/show_bug.cgi?id=1727750 .

Differential Revision: https://phabricator.services.mozilla.com/D125808
2021-12-08 11:34:20 +00:00
Norisz Fay 1d6984bc21 Backed out changeset 3dfd3c94a105 (bug 1701828) for causing mochitest failures on browser_hsts_host.js CLOSED TREE 2021-12-07 12:05:44 +02:00
Henri Sivonen 58476d7f17 Bug 1701828 - meta charset rewrite. r=smaug
Implements https://github.com/whatwg/html/issues/6962 . Improves performance
when <meta charset> occurs in head but after the first kilobyte and aligns
behavior better with WebKit and Blink.

The main change is to avoid reloads when meta appears within head but
after the first kilobyte. Prior to this change, Gecko reloaded in that
case (in compliance with the spec!) even though WebKit and Blink did not.

Differences from WebKit and Blink:

* WebKit and Blink honor <meta charset> in <noscript>. This implementation
  does not.
* WebKit and Blink look for meta as if the tree builder was unaware of
  foreign content. This implementation is foreign content-aware. This
  makes a difference for CDATA sections that contain a > before the meta
  as well as style and script elements within foreign content. This could
  happen if the CDATA section that has mysteriously been introduced around
  a what looks like a meta tag also contains another prior tag-looking
  run of text.
* This implementation processes rel=preload and speculative loads that are
  seen before <meta charset> has been seen. WebKit and Blink instead first
  look for the meta and rewind before starting speculative parsing.
* Unlike WebKit, if there is neither an honored meta nor syntax resembling
  an XML declaration, detection from content takes place (as in Blink).
* Unlike Blink, if there is neither an honored meta nor syntax resembling
  an XML declaration, the detection from content is not dependent of network
  buffer boundaries.
* Unlike Blink, detection from content can trigger a reload at the end of
  the stream if the guess made at that point differs from the first guess.
  (See below for the definition of the input to the first guess.)

Differences from the old spec and Gecko previously:

* Meta inside script and RCDATA elements is no longer honored.
* Late meta is now ignored and no longer triggers a reload.
* Later meta counts as early enough meta: In addition to the previous
  meta within the first 1024 bytes, now a meta that started within the first
  1024 bytes counts as early enough. Additionally, if by then there hasn't
  been a template start tag and head hasn't ended, meta occurring before the
  earlier of the end of the head or a template start tag counts as early
  enough.
* Meta now counts as not-late even if the encoding label has numeric
  character reference escapes.
* Syntax resembling an XML declaration longer than a kilobyte is honored if
  there is no honored meta.
* If there is neither an honored meta nor syntax resembling an XML declaration,
  the initial chardetng scan is potentially longer than before: the first 1024
  bytes, the token spanning the 1024-byte boundary if there is such a token,
  and, if by then head hasn't ended and there hasn't been a template start tag
  until the end of the template start tag or the end of the token that causes
  head to end, ever comes first. However, if the token implying the end of the
  head is a text token, bytes only to the end of the previous non-text token is
  considered. (This definition avoids depending on network buffer boundaries.)
* XML View Source now uses the code for syntax resembling an XML declaration
  instead of expat for extracting the internal encoding label.

Reftest are added as both WPT and Gecko reftests in order to test both http:
and file: URL scenarios. The Gecko tests retain the WPT <link> tags in order
to use the exact same bytes.

An encoding declaration has been added to a number of old tests that didn't
intend to test the new speculation behavior especially in the context of
https://bugzilla.mozilla.org/show_bug.cgi?id=1727750 .

Differential Revision: https://phabricator.services.mozilla.com/D125808
2021-12-07 07:35:32 +00:00
nchevobbe b31e82ce90 Bug 1238861 - Display a warning message when doctype is not standard. r=hsivonen.
This patchs adds new error messages which are extending existing ones,
providing extra information to the user.
A webconsole mochitest is added in the following patch of this stack.

Differential Revision: https://phabricator.services.mozilla.com/D131889
2021-12-02 22:46:22 +00:00
Christoph Kerschbaumer 6aafd54cd6 Bug 1724080: Have https-first and https-only rules apply to speculative connections r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D132239
2021-11-29 14:29:01 +00:00
Noemi Erli 0c17a17346 Backed out changeset fb595abd6511 (bug 1724080) for causing failures in browser_mixed_content_console.js CLOSED TREE 2021-11-29 14:25:31 +02:00
Christoph Kerschbaumer 7747b60099 Bug 1724080: Have https-first and https-only rules apply to speculative connections r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D132239
2021-11-29 11:27:21 +00:00
Eemeli Aro 368a8a1650 Bug 1733495 - Migrate plugins.properties to aboutPlugins.ftl. r=Gijs,fluent-reviewers,nbaumgardner,kpatenio
This is the first patch made using the properties-to-ftl tooling:
https://github.com/mozilla/properties-to-ftl

Differential Revision: https://phabricator.services.mozilla.com/D130984
2021-11-22 09:16:25 +00:00
Riya ac2ad7e7f2 Bug 1737032 - Removed traces of "remote XUL". r=Gijs,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D129255
2021-10-25 11:00:47 +00:00
Michael[tm] Smith 95631783b8 Bug 1736026 - Show HTTP status code in CORS messages r=necko-reviewers,emilio,valentin
Differential Revision: https://phabricator.services.mozilla.com/D128596
2021-10-21 02:55:15 +00:00
criss f46d6ec78d Backed out changeset c9da45719e55 (bug 1736026) for causing mochitest failures. CLOSED TREE 2021-10-16 14:51:08 +03:00
Michael[tm] Smith 6b6358f7fc Bug 1736026 - Show HTTP status code in CORS messages r=necko-reviewers,emilio,valentin
Differential Revision: https://phabricator.services.mozilla.com/D128596
2021-10-16 11:05:41 +00:00
Marcos Cáceres fd25c8573e Bug 1731940 - Web Manifest: implement id processing r=saschanaz
spec change https://github.com/w3c/manifest/pull/988

Differential Revision: https://phabricator.services.mozilla.com/D126331
2021-10-14 04:26:28 +00:00
Henri Sivonen 8954e892c8 Bug 1735161 - Update MDN URL in speculation failure message. r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128095
2021-10-12 06:49:15 +00:00
Luca Greco 7b70ba9812 Bug 1688040 - part9: Implement setting/clearing and reporting browser.runtime.lastError from ChromeCompatCallbackHandler::RejectedCallback. r=baku
This patch does:
- add to ExtensionBrowser two new data members to keep track of value for the browser.runtime.lastError and if it was checked while
  the chrome compatible callback was being executed
- add to ExtensionBrowser 3 new methods to set, get and clear the lastError value
- add a reference to the ExtensionBrowser to all API namespaces and API objects classes, because it has to be then propagated to the
  ChromeCompatCallbackHandler instances that are being attached to the promise result of the async API methods calls if the caller did
  pass the optional callback parameter
- tweak the ChromeCompatCallbackHandler class to set the lastError value before calling the callback in ChromeCompatCallbackHAndler::RejectedCallback
  and then clear it after the call has been completed and report it to the console if it wasn't checked
- change the ExtensionRuntime::GetLastError methhod to restrieve and return the value from the ExtensionBrowser instance

Differential Revision: https://phabricator.services.mozilla.com/D107327
2021-10-06 12:28:23 +00:00
Iulian Moraru 925895e1ed Backed out 27 changesets (bug 1688040) for causing multiple failures. CLOSED TREE
Backed out changeset 85ba163b6423 (bug 1688040)
Backed out changeset 36cdc1600e66 (bug 1688040)
Backed out changeset 88395ab5a5b5 (bug 1688040)
Backed out changeset 8d33bdd8d0b8 (bug 1688040)
Backed out changeset fdbced7a94f3 (bug 1688040)
Backed out changeset 922ca2f20fa1 (bug 1688040)
Backed out changeset 7fc233bf144c (bug 1688040)
Backed out changeset 64221db54d98 (bug 1688040)
Backed out changeset 4d9b2a9dd247 (bug 1688040)
Backed out changeset c8d890f1a8e2 (bug 1688040)
Backed out changeset 81e957717eb1 (bug 1688040)
Backed out changeset b7dcade29dab (bug 1688040)
Backed out changeset 20e38838aa89 (bug 1688040)
Backed out changeset 08737e7ea047 (bug 1688040)
Backed out changeset b82645d5b7c7 (bug 1688040)
Backed out changeset db374d34839a (bug 1688040)
Backed out changeset 6a2ebb56325d (bug 1688040)
Backed out changeset 7d0ce555263f (bug 1688040)
Backed out changeset 15e0689a57f0 (bug 1688040)
Backed out changeset d7d6b1bec92a (bug 1688040)
Backed out changeset 615b683acb00 (bug 1688040)
Backed out changeset 49d3e1baf577 (bug 1688040)
Backed out changeset 30cc613912ce (bug 1688040)
Backed out changeset d413ec19bded (bug 1688040)
Backed out changeset cfdf6e87d820 (bug 1688040)
Backed out changeset f719b9d0bc25 (bug 1688040)
Backed out changeset 925f23a58da6 (bug 1688040)
2021-10-05 22:49:40 +03:00
Luca Greco 723f7b0a0a Bug 1688040 - part9: Implement setting/clearing and reporting browser.runtime.lastError from ChromeCompatCallbackHandler::RejectedCallback. r=baku
This patch does:
- add to ExtensionBrowser two new data members to keep track of value for the browser.runtime.lastError and if it was checked while
  the chrome compatible callback was being executed
- add to ExtensionBrowser 3 new methods to set, get and clear the lastError value
- add a reference to the ExtensionBrowser to all API namespaces and API objects classes, because it has to be then propagated to the
  ChromeCompatCallbackHandler instances that are being attached to the promise result of the async API methods calls if the caller did
  pass the optional callback parameter
- tweak the ChromeCompatCallbackHandler class to set the lastError value before calling the callback in ChromeCompatCallbackHAndler::RejectedCallback
  and then clear it after the call has been completed and report it to the console if it wasn't checked
- change the ExtensionRuntime::GetLastError methhod to restrieve and return the value from the ExtensionBrowser instance

Differential Revision: https://phabricator.services.mozilla.com/D107327
2021-10-05 17:05:44 +00:00