When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.
To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.
MozReview-Commit-ID: FTkjuHO7RFp
When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.
To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.
MozReview-Commit-ID: FTkjuHO7RFp
The external helper app service waits for a second before closing the window,
which could lead to races. Also wait for the tab to close to avoid similar
races, there.
MozReview-Commit-ID: IdxNWRPheoY
--HG--
extra : rebase_source : 7b53e9690ad64994c5b8c5f6aa2a7f80db9a6a04
The default nsIHandlerService implementation is switched to the one that uses the JSON data store, and any previously configured handlers are imported from the RDF data store if the "gecko.handlerService.migrated" preference is not set.
MozReview-Commit-ID: 7o3JgAtR5Hx
--HG--
extra : rebase_source : a95c783ebb6bb4a7fdd8c34e2ec9ce0ac744b092
This patch significantly improves the test coverage for both the JSON and RDF back-ends. There is a clearer separation between tests using predefined data and tests for the injection of default handlers. The predefined data includes more significant property combinations, and the JSON is now formatted. Helper functions are renamed for clarity.
Functions like "exists" that have different paths for MIME types and protocols are now tested with both, while behaviors that have a single path are now only tested with MIME types for efficiency.
The file format is redesigned to be more compact, and all the data is normalized when saving instead of when loading. Duplicates are now handled correctly when saving.
MozReview-Commit-ID: JI4I1M0N3lq
--HG--
extra : rebase_source : 06920d9be56830f81e3e01cbc97a02983f50c264
extra : source : 3c4b8028ac594ee24760feb96e93bfdab9704e98
This change is tested in detail as part of bug 1355585.
MozReview-Commit-ID: 5z4evaUQDFI
--HG--
extra : rebase_source : 507fc823746667a27ff159d8347999eb2e007453
extra : source : 3e41ab5e66765a8955d77482d74c48db1255ee45
This patch significantly improves the test coverage for both the JSON and RDF back-ends. There is a clearer separation between tests using predefined data and tests for the injection of default handlers. The predefined data includes more significant property combinations, and the JSON is now formatted. Helper functions are renamed for clarity.
Functions like "exists" that have different paths for MIME types and protocols are now tested with both, while behaviors that have a single path are now only tested with MIME types for efficiency.
The file format is redesigned to be more compact, and all the data is normalized when saving instead of when loading. Duplicates are now handled correctly when saving.
MozReview-Commit-ID: JI4I1M0N3lq
--HG--
extra : source : b261ced27c55155bd0e3f92efbf90ae6ed8fc664
extra : amend_source : 64dc1b735bda798620e21db4ae942863fd00bb16
This change is tested in detail as part of bug 1355585.
MozReview-Commit-ID: 5z4evaUQDFI
--HG--
extra : source : 972bb1937119fb1742dc94742fcac80af4c108ee
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).
--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
This change is tested in detail as part of bug 1355585.
MozReview-Commit-ID: 74nDQjGlFjA
--HG--
extra : source : 3e70d2516749bbb586b419d71c298bc6cfb365c4
Our caller is C++ code, and the implementations are all also written in C++,
so there is no reason to go through SpiderMonkey here. This patch also makes
nsILoadContext builtinclass to ensure that the implementation is always native.
On Android, nsIHandlerInfo instances representing protocols are also instances of nsIMIMEInfo. This causes the RDF back-end of the handler service to store them in the same cateory as MIME types. This fix corrects the situation for the JSON back-end, while leaving the RDF back-end unchanged for backwards compatibility.
Detailed testing is added using different RDF reference files for Desktop and Android.
MozReview-Commit-ID: B0ls60jfENe
--HG--
extra : source : 0bfa2e0ad6232cbaf66dd7e42326101e23b62352
This improves performance because we won't try to fix the permissions of the file every time the nsIHandlerService implementation wants to open it, and makes it easier to access the file path from xpcshell tests.
MozReview-Commit-ID: DZmLa92qUnZ
--HG--
extra : source : bd0fdce03cc7442079e96318d3a9b519a4d403a9