If an interrupt occurs during regexp execution, we return up the stack to RegExpShared::execute to handle it, then try again. Normally it's safe (if slow) to GC and discard jitcode at this point, because we can fall back to interpreted bytecode (which is not discarded). However, if the input string is long enough, then we [jump straight to compilation without producing bytecode](https://searchfox.org/mozilla-central/rev/7067bbd8194f4346ec59d77c33cd88f06763e090/js/src/vm/RegExpObject.cpp#590-596). In that case, when we resume, we will have neither bytecode nor jitcode, and end up dereferencing a null pointer.
The fix is to recompile after handling the interrupt. In addition to fixing the crash, forcing compilation here should improve our chance of eventual success (compared to resuming in the regexp interpreter).
Differential Revision: https://phabricator.services.mozilla.com/D104479
If an addition of integer values overflows, we will transpile a CacheIR stub containing a `DoubleAddResult`. In this testcase, after some optimization, we have MIR that looks like:
```
17 phi toDouble15:Double add10:Double
22 add phi17:Double phi17:Double [double]
...
24 truncatetoint32 add22:Double
```
Range analysis sees that the only consumer of `add22` is a truncation, and truncates the add to Int32. When we overflow again and bail out, we don't make any changes to the CacheIR, because it already handles the overflow case. We end up in a bailout loop.
This patch fixes the problem by marking every truncated instruction with `TruncateKind::TruncateAfterBailout` as `BailoutKind::EagerTruncation`. If the instruction bails out, `FinishBailoutToBaseline` will invalidate the script and set the `hadEagerTruncationBailout` flag. When we recompile, that flag will prevent range analysis from truncating any instructions with `TruncateKind::TruncateAfterBailout`.
Differential Revision: https://phabricator.services.mozilla.com/D102949
- Recently we use size allocation event to create wl_subsurface of MozContainer. Unfortunately size allocation event
is not called when a window is opened second time, as its size is already set. Use map_event to create
wl_subsurface in this case.
Differential Revision: https://phabricator.services.mozilla.com/D104551
- Try to set subsurface offset even if we mozcontainer size allocation is not finished. Use window decoration size for it.
- Add more logging to mozcontainer code.
Depends on D104549
Differential Revision: https://phabricator.services.mozilla.com/D104550
Rework wl_subsurface creation in these steps:
1) moz_container_wayland_size_allocate() handler is called when
mContainer size/position is known.
It calls moz_container_wayland_surface_create_locked(), registers
a frame callback handler
(moz_container_wayland_frame_callback_handler()).
2) moz_container_wayland_frame_callback_handler() is called
when wl_surface owned by mozContainer is ready.
We call initial_draw_cbs() handler and we can create our wl_subsurface
on top of wl_surface owned by mozContainer.
Also size wl_buffer at WindowSurfaceWayland according to mozcontainer size,
don't use nsWindow bounds for it.
Differential Revision: https://phabricator.services.mozilla.com/D104549
Currently webrender requires the extension
GL_OES_EGL_image_external_essl3 to render video. There exist some
older GLES 3 devices which do not support this extension, and
attempting to render video on these devices results in a shader
compilation error and falling back to OpenGL layers.
In bug 1507074 we will implement a long term solution for such
devices, but in the meantime block webrender on devices which do not
support this extension.
Differential Revision: https://phabricator.services.mozilla.com/D104669
We add a few localized string in perftools.ftl to replace to hardcoded labels
in the component.
This allows us to simplify the structure of the component.
We take this opportunity to re-use the localized string we have to link to the
advanced section of the settings panel.
Differential Revision: https://phabricator.services.mozilla.com/D104155
We used to only wait until the markup view document was loaded, via the markuploaded event.
This lead tests to wait for additional events to make sure the inspector markup view could
be interacted with.
Here we wait for a new dedicated internal promise instead of an event.
This promise is only resolved once the inspector has initialized the markup view.
Test helpers are updated to stop listening for additional events.
Differential Revision: https://phabricator.services.mozilla.com/D104649
This patch make the warning and error messages visible when such messages were
emitted, for the RDM screenshot button, the toolbar screenshot button and the
inspector screenshot node context menu entry.
In the case of the toolbar screenshot button in the browser toolbox, we also
display the saved messages so users have a way to know where the file was saved.
We don't do anything more for `:screenshot` command in the console, as the messages
are already displayed directly in the console output.
Tests are added for the different use case. The RDM one is a bit different as
we can't have a viewport taller than 9999px, so we bump the dpr to make capture-screenshot
downsize it (as such image would be too big).
We take this opportunity to fix the `takeNodeScreenshot` helper, which was adding
a "load" event listener after setting the src on an image, which can lead to races.
Differential Revision: https://phabricator.services.mozilla.com/D104058
Due to rendering issues reported on a Mali-T628 and Mali-T760, disable
partial present on all Mali-T6xx and T7xx devices. We know that not
all T6xx and T7xx devices are affected, so this is being cautious. The
driver version is probably more important than the GPU model. We
should make the block more precise once more is known about the bug.
Differential Revision: https://phabricator.services.mozilla.com/D104678