I left the implementation in nsMemoryImpl.cpp so that the
diff looks reasonable.
I also got rid of the weird singleton runnable and replaced
it with NS_NewRunnableFunction.
Differential Revision: https://phabricator.services.mozilla.com/D158214
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.
Differential Revision: https://phabricator.services.mozilla.com/D158213
It turns out that the INI parser used by NSIS only supports UTF-16LE encoding. Our INI parser doesn't support UTF-16 at all, so we need to a bit of work ourselves to write this file correctly.
Differential Revision: https://phabricator.services.mozilla.com/D157378
This allows callers to re-encode the data (eg: to UTF-16) and write or otherwise do with the formatted data as they wish.
I ended up adding/exposing additional init methods in part because I thought it made sense to support initialization from a string since we can now write to one, but also to make testing easier.
Differential Revision: https://phabricator.services.mozilla.com/D157377
This is, I think, an improvement to the hover text when a user directly pins `private_browsing.exe` to the Taskbar through Explorer. When pinned like this, we have no control over the text of the shortcut. Windows uses the EXE Description -- so we end up with `private_browsing.lnk`, which causes `private_browsing` as the hover text.
With this patch, it ends up being MOZ_APP_DISPLAYNAME, which in the real world will typically come out as something like "Firefox Nightly" or "Firefox Nightly (2)" (the latter will happen if a "Firefox Nightly" shortcut already exists). I _think_ this is an improvement over the current situation, as it least it's a more human readable string, and different per branding - but I'm open to opinions here.
In an ideal world this would be a localized string, but due to it ultimately coming from `configure.sh`, we do not have an existing method to localize it.
Even if we want to use a different string here we ought to take some form of this patch so that we get exe metadata for `private_browsing.exe`.
Differential Revision: https://phabricator.services.mozilla.com/D158216
`TSFTextStore` needs to expose the document URL for supporting new feature
of Windows 11 22H2 update. Therefore, the `InputContext` should have the
document URL.
Differential Revision: https://phabricator.services.mozilla.com/D157893
Remove the conditional *Rooter member in the union conversion structure and switch
the regular union structure to use Rooted* for Record and Sequence that contains
js object (like what we do for Dictionary type). Codegen introudces a new type on
isMember in getJSToNativeConversionInfo() as we need to generate different conversion
code for Sequence and Record if they are union member which now use Rooted* instead
of *Rooter to root js object.
Differential Revision: https://phabricator.services.mozilla.com/D157326
We were using <html:iframe sandbox> and it still allows running arbitrary code in the parent process.
Using <xul:iframe type=content remote=true> ensure that we run this code in a content process,
and restrict its privileges to a regular content page.
Differential Revision: https://phabricator.services.mozilla.com/D76759
This is a first changeset in order to create the iframe element in JS.
This still generate the same DOM elements, an html:iframe,
but this will help the following changeset to create XUL elements.
There is no way to create XUL Element via React in render methods.
Differential Revision: https://phabricator.services.mozilla.com/D76936
We disallow notification permission requests from cross-origin iframes (see bug 1560741).
It makes sense that we also disallow showing notification from cross-origin iframes,
even if user has granted the notification permission on that origin.
Differential Revision: https://phabricator.services.mozilla.com/D158147
The frontend error is converted into the runtime error in
AutoReportFrontendContext destructor, and it can GC.
If the function's return value is GC thing, AutoReportFrontendContext
destructor must be called before the return statement, and thus
AutoReportFrontendContext must be put into a block, and the return value
must be stored into `JS::Rooted` outside of the block.
Differential Revision: https://phabricator.services.mozilla.com/D157451