While formal ISO dates must have 4-digit years, implementations tend to
allow dates up until +275760-09-13T00:00:00Z per the TimeClip algorithm:
* https://tc39.es/ecma262/#sec-timeclip
* https://tc39.es/ecma262/#sec-utc-t
As well as cases such as "1995-09-26 09:00 EST" where the time and
timezone are specified as with any other date.
This patch also adds support for formats like "1-12-20" or "1-12-2012".
The date is returned in localtime, but the limit is processed in GMT.
Differential Revision: https://phabricator.services.mozilla.com/D189895
In `getTokenLocation`, the call to `coordsChar` needed an extra parameter so the
coordinates are relative to the top left corner fo the currently visible window.
We were passing the center of the bounding client rect to `getTokenLocation`, but
a token could wrap and have it's bounding rect center not being on the token.
To fix this we're passing the center of the first box quads of the token.
The inline preview widgets were causing some troubles on CodeMirror internal
state too. Since we're using React to populate the bookmark we set on the line,
and given that React.render is asynchronous, we were setting an empty element
as a bookmark on the editor, which React populates later. But CodeMirror probably
update its internal state when the bookmark is added, so that was causing wrong
computation later.
To avoid that, we only set the bookmark once React actually rendered the element
in the DOM.
Finally, while codeMirror already listen for window resize to update its internal
state, the Editor can be resized without the window being resized,
when primary/secondary panels are resized. In such case, we manually trigger
a codeMirror refresh.
We add a test to cover this, and also modify test helpers so we would query
the DOM instead of relying on CodeMirror methods.
Differential Revision: https://phabricator.services.mozilla.com/D190272
Waiting for the full load sometimes will take more than the timeout, and we
don't really need to do it for the purpose of this helper.
Differential Revision: https://phabricator.services.mozilla.com/D190756
This introduces two slight changes of behavior:
- Workers with a system principal are now always treated as secure context, without looking at the mIsSecureContext flag.
- We now also discard sources for all types of workers with a system principal
Differential Revision: https://phabricator.services.mozilla.com/D190282
Since `CountGraphemeClusters` is called from PresShell::DoFlushLayout when
using counter style. To optimize this, I would like to cache
`ICU4XGraphemeClusterSegmenter`.
Differential Revision: https://phabricator.services.mozilla.com/D190750
Changes in this patch
- Rename the `token-events.js` => `token.js`
- Unify all the token realted utils into `token.js`
- Remove other token util related files
- Remove not really useful jest test `get-token-location.spec.js` as this is already covered by preview related mochitests
Differential Revision: https://phabricator.services.mozilla.com/D181960
Searchfox suggested the code to handle self-hosted lazy functions is dead and
this is indeed no longer used to clone lazy self-hosted functions.
Depends on D190821
Differential Revision: https://phabricator.services.mozilla.com/D190823
We were always emitting `GuardSpecificFunction` for self-hosted functions, but this
doesn't work well for self-hosted lambda functions because there we have lambda clones
and we want to guard on the script instead.
Lambdas aren't very common in self-hosted code, but `ArraySortCompare` returns a lambda
function and that's where it was causing unnecessary bailouts and recompilations.
Differential Revision: https://phabricator.services.mozilla.com/D190821
As the comment in the method, `CurrentBlockBoundary` may be set when `mContent`
is not a block. However, it's not allowed that there is an editable block
ancestor of `mContent` in same editing host (in this case, `mContent` should be
the block). Therefore, it should compute ancestor block element and check
whether it's not in same editing host if `mContent` is editable and connected.
Differential Revision: https://phabricator.services.mozilla.com/D190644
The patches for bug 1855321 changed the tag bits on JIT-frame FP values,
but this test was not updated. This patch fixes the hardcoded
assertions.
Differential Revision: https://phabricator.services.mozilla.com/D190896
The previous commits to shared.nsh resulted in auto-pinning only occurring in Windows 11 builds that weren't build number 22621 or higher, but a lot of users on Windows 11 are on 22621 already and the build number to pay attention to, when MS introduced the user confirmation for pinning popup, is in Windows 11, 22621, UBR 2361.
This commit checks for the UBR number too.
Differential Revision: https://phabricator.services.mozilla.com/D190859
Several of the jit-tests need to be modified for all tests to pass with
PBL enabled and eager (test with `--portable-baseline
--portable-baseline-eager`). With these changes, all jit-tests do pass.
The changes fall into several main categories:
* Because PBL diverges slightly in decompiler usage, error messages are
sometimes more generic (e.g., "undefined value" rather than "x is
undefined", that sort of thing). Several of these changes loosen
error-message expectations or exclude the relevant tests from PBL.
All actual error statuses (code works or throws exception) remain
correct.
* PBL's auxiliary stack and recursion limit are smaller than native
baseline supports, at least on some platforms; recursion counts that
are meant to invoke overflow or not invoke overflow (but whose
specific value is otherwise immaterial) are thus adjusted in places.
* A few other miscellaneous changes, supported at each point with a
comment.
Differential Revision: https://phabricator.services.mozilla.com/D189310
This commit adds the body of PBL, the Portable Baseline Interpreter.
A more detailed description is included in the [SMDOC] in the header
file.
Almost all of this commit was authored by the named commit author; two
CacheIR guard opcodes, the constructor-call fastpath, and several
bugfixes are due to Jamey Sharp <jsharp@fastly.com> (thanks!).
Differential Revision: https://phabricator.services.mozilla.com/D189307
* Sometimes there is no JitRuntime, even if we are in baseline-related
code paths.
* Sometimes a jit-code or stub-code pointer is null.
Differential Revision: https://phabricator.services.mozilla.com/D189306
PBL diverges slightly from the native baseline implementation's stack
state at IC invocation time (though the stack signatures of all JSOps
match when including the pre-IC and post-IC logic) and thus PBL must
avoid invocation of the expression decompiler for error messages in some
cases. This commit makes the fallback IC logic more tolerant of missing
"stack indices" for this purpose.
Differential Revision: https://phabricator.services.mozilla.com/D189305
This stack is needed by PBL to store baseline stack frames, because it
cannot use the machine stack (which will be managed by the host's C++
compiler instead).
Differential Revision: https://phabricator.services.mozilla.com/D189303