Commit Graph

1212 Commits

Author SHA1 Message Date
aiunusov
5cca3ceec2 Bug 1926181 - Tweak TimeoutManager for usage with Workers, r=smaug,dom-worker-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226433
2025-01-27 11:46:06 +00:00
Kagami Sascha Rosylight
d0b3729074 Bug 1937272 - Fix and use IsServiceWorkersTestingEnabledInGlobal for workers and caches r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D233269
2025-01-07 00:44:51 +00:00
Chris H-C
7afc7216f5 Bug 1938601 - Replace COMPONENTS_SHIM_ACCESSED_BY_CONTENT with use counter r=nika
Differential Revision: https://phabricator.services.mozilla.com/D232732
2024-12-20 21:31:49 +00:00
Frédéric Wang
6088184f0f Bug 1931290 - Implement Trusted Types support for Window's setInterval()/setTimeout(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D229312
2024-11-29 12:18:20 +00:00
Frédéric Wang
89b01a78a5 Bug 1931290 - Use "Function or DOMString" in setTimeout/setInterval IDL. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D229309
2024-11-29 12:18:20 +00:00
Valentin Gosu
056ff7244b Bug 1931514 - Remove nsITimedChannel.timingEnabled r=necko-reviewers,kershaw
Timing should always be enabled.

Differential Revision: https://phabricator.services.mozilla.com/D229340
2024-11-20 20:53:51 +00:00
Fatih
5e9f781d55 Bug 1929955: Correct dPR calculation. r=tjr
Non-rfp dPR calculation rounds [UnZoomedAppUnits/FullZoom](https://searchfox.org/mozilla-central/rev/451aacd753c98b3200f120ed4340e1ed53b7ff47/gfx/src/nsDeviceContext.cpp#461), but our implementation doesn't. This patch fixes that.

Differential Revision: https://phabricator.services.mozilla.com/D228379
2024-11-08 19:46:22 +00:00
Fatih
4580bdd402 Bug 1873382: Multiply zoom by spoofed pixel ratio for resolution, -moz-device-pixel-ratio, and -webkit-{min|max}-device-pixel-ratio media queries. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D224247
2024-11-06 16:45:14 +00:00
Bryan Thrall
efe9f517e5 Bug 1724236 - Perform early return on permission check r=arai
Differential Revision: https://phabricator.services.mozilla.com/D226717
2024-10-30 13:41:48 +00:00
Bryan Thrall
aaef423da2 Bug 1724236 - Inline InstantiateStencil(cx, options, stencil, script) r=arai
Differential Revision: https://phabricator.services.mozilla.com/D222298
2024-10-30 13:41:47 +00:00
Bryan Thrall
3bacfd5034 Bug 1724236 - Rename JSExecutionUtils from JSExecutionContext r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218458
2024-10-30 13:41:47 +00:00
Bryan Thrall
0b84b732ae Bug 1724236 - Remove JSExecutionContext r=arai
I think the constructor assertions don't need to be preserved, since the
locations where JSExecutionContext was constructed are obviously using a real
global on the main thread. I'm less confident in removing the check for
CycleCollectedJSContext::Get()->MicroTaskLevel(), but it should be ok since the
assertion wasn't failing already.

I'm leaving the profiler label "JSExecutionContext" intact for now so there's
no change in recorded profiles, but we should consider a better name for it in
the future.

Differential Revision: https://phabricator.services.mozilla.com/D218457
2024-10-30 13:41:46 +00:00
Bryan Thrall
a85ba25a1c Bug 1724236 - Move JoinOffThread and InstantiateStencil out of JSExecutionContext r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218455
2024-10-30 13:41:46 +00:00
Bryan Thrall
c04c306a9f Bug 1724236 - Pass debugger parameters as arguments instead of members r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218454
2024-10-30 13:41:45 +00:00
Bryan Thrall
8e00518582 Bug 1724236 - Inline ExecScript and move ExecScriptAndCoerceString to where it is used r=arai
ExecScript returning a value was only used in one place, and that call always
coerced the return value to a string.

Differential Revision: https://phabricator.services.mozilla.com/D218451
2024-10-30 13:41:44 +00:00
Bryan Thrall
e859d8b8d0 Bug 1724236 - Move Compile and Decode out of JSExecutionContext r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218450
2024-10-30 13:41:44 +00:00
Bryan Thrall
e6436b95c3 Bug 1724236 - Move InstantiateStencil out of Compile and Decode r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218449
2024-10-30 13:41:42 +00:00
Bryan Thrall
ffd49dfc27 Bug 1724236 - Move ExecScript out of JSExecutionContext r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218448
2024-10-30 13:41:42 +00:00
Bryan Thrall
930e0cf266 Bug 1724236 - Pass cx as function argument instead of member r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218447
2024-10-30 13:41:42 +00:00
Bryan Thrall
c9529870d4 Bug 1724236 - Pass script as function argument instead of member r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218446
2024-10-30 13:41:41 +00:00
Bryan Thrall
2f6237583a Bug 1724236 - Move profiler label and JSAutoRealm out of JSExecutionContext r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218444
2024-10-30 13:41:40 +00:00
Bryan Thrall
b6fd76662b Bug 1724236 - Get CompileOptions from function arguments instead of member r=arai
Differential Revision: https://phabricator.services.mozilla.com/D218442
2024-10-30 13:41:40 +00:00
Bryan Thrall
190d6b921b Bug 1724236 - Simplify error handling via ErrorResult r=arai
Differential Revision: https://phabricator.services.mozilla.com/D224548
2024-10-30 13:41:39 +00:00
Bryan Thrall
79ae9289a9 Bug 1724236 - Move error tracking to JSExecutionContext callers r=arai
Using ErrorResult should go away by the end of the patch stack for this bug.

I needed to use some failure error code to indicate when
xpc::Scriptability::Allowed() failed so that callers can skip further use of
JSExecutionContext, and also return NS_OK. NS_ERROR_DOM_NOT_ALLOWED_ERR seemed
a reasonable choice, but it is temporary.

ExecScript(aRetValue) is only called by nsJSThunk::EvaluateScript(), which
initializes the JS::Value parameter to JS::Undefined. You can see in the caller
that it will still be JS::Undefined if any errors happen through use of
JSExecutionContext. Therefore, setting the value to JS::Undefined if `mSkip` at
the beginning of ExecScript() isn't needed any more.

We need to leave any exception on the JSContext for AutoJSAPI to handle, or
those exceptions won't propagate properly. For example, tests like
testing/mochitest/tests/Harness_sanity/test_sanityException.html will fail.

Differential Revision: https://phabricator.services.mozilla.com/D218441
2024-10-30 13:41:39 +00:00
serge-sans-paille
262f78c07f Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Alexandru Marc
a5eb905bf4 Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille
07101ac24d Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc
004e704b22 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille
2c916d4973 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Andrew Sutherland
a0f1dba961 Bug 1131324 - Expose ServiceWorkerContainer on WorkerNavigator. r=dom-worker-reviewers,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D213725
2024-10-24 03:02:40 +00:00
Andrew Sutherland
5abed69e0f Bug 1900706 - Expose equivalent of nsContentUtils::ReportToConsole on nsIGlobalObject. r=smaug
A notable change in this stack is to ensure that we populate mOwner on
workers.

Differential Revision: https://phabricator.services.mozilla.com/D213724
2024-10-24 03:02:39 +00:00
Andrew Sutherland
afa433ddab Bug 1900431 - Expose GetBaseURI on nsIGlobalObject. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D213723
2024-10-24 03:02:39 +00:00
Andrew Sutherland
fe7cff9114 Bug 1900427 - Expose CookieJarSettings on nsIGlobalObject. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D213722
2024-10-24 03:02:38 +00:00
Matthew Gaudet
f753b8986b Bug 1924888 - Swap order of arguments to DescribeScriptedCaller r=sfink
It's not a standard exception throwing JSAPI function. The one caveat here is
that I couldn't put JSContext in last position: There are default params to
preserve. So instead it's in second position, which still communicates that
it's not an exception throwing function

Differential Revision: https://phabricator.services.mozilla.com/D225726
2024-10-16 15:58:19 +00:00
keithamus
014c5aa7d2 Bug 1888729 - Implement CloseWatcher interface r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D206169
2024-09-16 17:08:53 +00:00
Gregory Pappas
cd6cb6b893 Bug 1917745 - Cleanup sizeToContent r=webidl,reusable-components-reviewers,emilio,migration-reviewers,tgiles,mconley
- Remove the pref for enabling sizeToContent in unprivileged web content
- Merge sizeToContentConstrained into sizeToContent
- Remove tests that are not necessary now that sizeToContent is ChromeOnly

Differential Revision: https://phabricator.services.mozilla.com/D221575
2024-09-13 07:56:12 +00:00
Andrea Marchesini
776b28b9d2 Bug 1475599 - part 2 - CookieStore API - IPDL, r=edgul,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215145
2024-09-12 16:48:19 +00:00
Andrea Marchesini
0e3dcedb47 Bug 1475599 - part 1 - CookieStore API - WebIDL, r=smaug,edgul
Differential Revision: https://phabricator.services.mozilla.com/D215144
2024-09-12 16:48:18 +00:00
Iulian Moraru
ccb003999e Backed out 11 changesets (bug 1475599) for causing wpt failures on change_eventhandler_in_bfcache.https.window.html. CLOSED TREE
Backed out changeset 74d0efb3b0d1 (bug 1475599)
Backed out changeset 7e736b5732c1 (bug 1475599)
Backed out changeset 8620daea37ad (bug 1475599)
Backed out changeset 0d57b435d872 (bug 1475599)
Backed out changeset a63a5bcb0524 (bug 1475599)
Backed out changeset cd8cc80dc7e9 (bug 1475599)
Backed out changeset ef2cdfb059af (bug 1475599)
Backed out changeset d3c7729a1972 (bug 1475599)
Backed out changeset 7eccbaa8e62e (bug 1475599)
Backed out changeset cc3c39aa8fb8 (bug 1475599)
Backed out changeset 2fc9a3d0ad8b (bug 1475599)
2024-09-12 00:03:14 +03:00
Fatih
1f64ded443 Bug 1918202: Spoof orientation based on screen size. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D221863
2024-09-11 19:29:17 +00:00
Andrea Marchesini
97580f39c2 Bug 1475599 - part 2 - CookieStore API - IPDL, r=edgul,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215145
2024-09-11 16:26:55 +00:00
Andrea Marchesini
318811c5f4 Bug 1475599 - part 1 - CookieStore API - WebIDL, r=smaug,edgul
Differential Revision: https://phabricator.services.mozilla.com/D215144
2024-09-11 16:26:54 +00:00
Tamas Szentpeteri
9b65ed1b2d Backed out 11 changesets (bug 1475599) for causing mochitest failures on browser_script_command_execute_basic.js. CLOSED TREE
Backed out changeset 51aa424e5ec9 (bug 1475599)
Backed out changeset 01c2bc6d727a (bug 1475599)
Backed out changeset 2d925ea3da19 (bug 1475599)
Backed out changeset 30d5dfedf252 (bug 1475599)
Backed out changeset fc3b4c5ee4b2 (bug 1475599)
Backed out changeset 0cfe4b34b57a (bug 1475599)
Backed out changeset fc19677480ad (bug 1475599)
Backed out changeset f279f023c340 (bug 1475599)
Backed out changeset 4063d0c74231 (bug 1475599)
Backed out changeset 0868fb4018a7 (bug 1475599)
Backed out changeset 9c8b6e35bf3f (bug 1475599)
2024-09-11 00:31:53 +03:00
Andrea Marchesini
4c2e8563cb Bug 1475599 - part 2 - CookieStore API - IPDL, r=edgul,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215145
2024-09-10 16:31:38 +00:00
Andrea Marchesini
191d01a450 Bug 1475599 - part 1 - CookieStore API - WebIDL, r=smaug,edgul
Differential Revision: https://phabricator.services.mozilla.com/D215144
2024-09-10 16:31:38 +00:00
Fatih
c90192af68 Bug 1607032: Spoof screen orientation and angle to primary values. r=tjr,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D220904
2024-09-09 21:57:17 +00:00
Sandor Molnar
ca978e2606 Backed out changeset 65b82edb2b88 (bug 1888729) for causing build bustages @ CloseWatcherManager.h CLOSED TREE 2024-08-21 19:01:23 +03:00
keithamus
cee439094e Bug 1888729 - Implement CloseWatcher interface r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D206169
2024-08-21 13:49:38 +00:00
Sean Feng
1341b819e2 Bug 1863246 - Make the page that enters BFCache not asking the parent process to update the active browsing context r=peterv,dom-core
Currently, when a page enters BFCache, it updates the parent process
for the active BC; however, the page that is about to show will do the
same. These two operations are triggered in different processes with
different active id, they are racy and problematic.

This patch fixes the above issue by not updating the parent process
when a page enters BFCache.

This only applies to BFCacheInParent is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D215818
2024-08-14 19:48:17 +00:00
Emilio Cobos Álvarez
a44b49af0b Bug 1910698 - Add a struct to represent JS caller location and more general warning source location. r=smaug,necko-reviewers,anti-tracking-reviewers,dom-storage-reviewers,pbz,kershaw,janv
Use it liberally across the tree. This could be cleaned up even more in the future.

Differential Revision: https://phabricator.services.mozilla.com/D218114
2024-08-01 17:12:48 +00:00