kIndexTimeNotAvailable has a special meaning when reading the times from the index, but measured times are passed to CacheFile::SetNetworkTimes and 65535ms is a valid time.
Unfortunately, GetRestoringDocument can be false by the time we reach
LoadComplete, if part of the restoration process managed to set up and then
remove onload blockers. If that happens, we still don't want to fire a load
event for a document that has already has one fired.
Note that we could also use a boolean on the document to record whether we've
fired a load event, as long as we were careful to unset it when the readyState
transitions backwards from COMPLETE (e.g. document.open). It's not clear which
approach is more robust.
This makes DOMException.prototype.toString() throw when it wouldn't have
before. But it throws in other browsers already, so this is presumably web-compatible.
The idea is this:
Offsets, like token positions and scripts' begin/end and
toString{Start,End}, are now always offset from the beginning of the
script's full ScriptSource buffer. That is, when delazifying, if the
buffer we are parsing is an interior pointer into some outer script's
ScriptSource buffer, the token offsets for that parsing session are
still offset from that outer buffer instead of the interior pointer.
The initial column number in CompileOptions will be added to the column
number when an offset maps to the initial line of the ScriptSource.
Columns are computed from offsets, but have no bearing on how to index
into the ScriptSource buffers.
<!-- Please describe your changes on the following line: -->
These changes aim to fix#15247
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#15247 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes
- [x] These changes do not require tests because cors is already tested with different origins
These changes require changes in tests, but I need help with that (see comments below).
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 2bb4f65100ca07e9281c8ad04cd498ff1346387f
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bbe08d6bb565dc0f8159c96caca5f18492a8ac2c
This patch moves the destructor after the constructor, puts the
NS_IMPL_ISUPPORTS line in a more sensible spot, and moves the Get*() functions
before the Format*() functions in order to match the order in
nsIStringBundle.idl.
--HG--
extra : rebase_source : 54250432bd084acd628ab1834bd344687a2f961d
GetStringFromName() enters mReentrantMonitor(), and the other Get*() functions
go through GetStringFromName(). But none of the Format*() functions enter the
monitor.
This patch moves some repeated code from GetStringFromName() and
FormatStringFromName() into GetStringFromNameHelper(), including the monitor
entry. All the Get*() and Format*() functions now use
GetStringFromNameHelper(), which means they now all enter the monitor.
--HG--
extra : rebase_source : 5d4c1931fb374d7aa10d6851f5ad8c0c774ffa79
Similar to the previous patch, this patch changes GetStringFromID() to call
GetStringFromName(), but this time in nsExtensibleStringBundle.
--HG--
extra : rebase_source : 38b12f5f0010396b2606969fb0c7baef96debe21
GetStringFromIDHelper() is very similar to GetSringFromNameHelper(). This patch
removes the former, and changes GetStringFromID() to call GetStringFromName(),
similar to how FormatStringFromID() calls FormatStringFromName().
--HG--
extra : rebase_source : ca1d6abffde106d5409b71c8c181fd604fc974ce