Граф коммитов

10034 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini 50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Masayuki Nakano fa5e6a171b Bug 1377989 - part3: Rename nsRange::GetParentAndOffsetAfter() to nsRange::GetContainerAndOffsetAfter() r=smaug
MozReview-Commit-ID: LsRjvVmfJmC

--HG--
extra : rebase_source : 32f4ee435dcf9323947f67cb4db70f0db1a4c9c1
2017-07-11 21:17:52 +09:00
Masayuki Nakano 4ee17d1b8c Bug 1377989 - part2: Rename nsRange::GetEndParent() to nsRange::GetEndContainer() r=smaug
MozReview-Commit-ID: K4qPjtZ62yO

--HG--
extra : rebase_source : 8653db98b9bd70c77a6aac8d906f401f0222c58a
2017-07-11 21:11:37 +09:00
Masayuki Nakano 2f2ce53be5 Bug 1377989 - part1: Rename nsRange::GetStartParent() to nsRange::GetStartContainer() r=smaug
Web standards use "Container" instead of "Parent".  So, nsRange shouldn't use "Parent" for its members and methods.

MozReview-Commit-ID: Ho6N0diuWtE

--HG--
extra : rebase_source : ee4eb7068a68b118c7fe98e9e9e7fa9c9e7f13e2
2017-07-11 20:53:04 +09:00
Hemant Singh Patwal 53e34790cc Bug 1378767 - Enable ESLint for extensions/pref/ r=standard8
MozReview-Commit-ID: BJWBoD3lcTb

--HG--
extra : rebase_source : b3ee9d94abdbe19a355c85da2b5abf148fe43689
2017-07-07 15:30:25 +05:30
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Michael Layzell 3fa953af9c Bug 1315092 - Part 2: Correctly clear mPrivateBrowsingId during the assertion as well on a CLOSED TREE, a=bustage
MozReview-Commit-ID: J8j4DWUzl8D
2017-07-05 13:41:48 -04:00
Michael Layzell c96029382b Bug 1315092 - Correctly ignore mPrivateBrowsingId when constructing permission keys, r=ehsan
MozReview-Commit-ID: 3uCvKE5MxR5
2017-07-05 12:41:13 -04:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Michael Layzell b213d28b54 Bug 1374665 - Stop parsing principals during GetPermissionsForKey, r=ehsan
MozReview-Commit-ID: 28BCIqA2Kf2
2017-06-22 14:46:18 -04:00
Florian Quèze 5b8f8b884c Bug 1374282 - script generated patch to remove Promise.defer calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Wes Kocher 3902194bb4 Backed out changeset 44532a19e524 (bug 1374665) for test_group_mouseevents.html failures a=backout
MozReview-Commit-ID: BNCBrA8XhRV

--HG--
extra : source : cbeb4bc60daa798c60102102c15e51a5af94265a
2017-06-21 17:10:40 -07:00
Michael Layzell 5d8224bf06 Bug 1374665 - Stop parsing principals during GetPermissionsForKey, r=ehsan
MozReview-Commit-ID: 28BCIqA2Kf2
2017-06-21 14:23:18 -04:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Wes Kocher c0e1236f1a Merge autoland to m-c a=merge
MozReview-Commit-ID: LFtpTAueYrF
2017-06-20 18:24:29 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Sebastian Hengst efd723cdad merge mozilla-central to autoland. r=merge 2017-06-18 00:21:41 +02:00
Masatoshi Kimura 3231cb3535 Bug 1372886 - Remove dead parameters from nsIConverterInputStream.init(). r=hsivonen
MozReview-Commit-ID: GliLHLsUWjt

--HG--
extra : rebase_source : 50d3f4680a498125ddf600b0d64f6740b0229f80
2017-06-17 19:30:09 +09:00
Ehsan Akhgari 8ba7fa2a64 Bug 1370754 - Dispatch spell checker tasks to the idle queue; r=masayuki
We use a timeout of 1 second to ensure that spell checking
will happen with some delay since it is visible to the
user.
2017-06-16 15:22:47 -04:00
Ehsan Akhgari acb69ad667 Backout bug 1370754 for test failures 2017-06-16 13:54:50 -04:00
Ehsan Akhgari fa242ea02c Bug 1370754 - Dispatch spell checker tasks to the idle queue; r=masayuki
We use a timeout of 1 second to ensure that spell checking
will happen with some delay since it is visible to the
user.
2017-06-16 12:17:30 -04:00
Evelyn Hung 53f744301b Bug 1354641 - adjust the value of spell check heuristics. r=Ehsan,masayuki
This patch is mainly for adjusting the value of INLINESPELL_CHECK_TIMEOUT
from 50ms to 1ms. The value means how long the main thread is blocked
for spelling check, and 50ms is too long. It causes significant delays
when a rich content document is loading, and the user tries to
type immediately before spell checking is done.

With the INLINESPELL_CHECK_TIMEOUT setting to 1ms, it's possible to be
too short to less powerful machines. Therefore we add
INLINESPELL_MINIMUM_WORDS_BEFORE_TIMEOUT to ensure at least N words were
checked.

MozReview-Commit-ID: 2PmAOWs5qjn

--HG--
extra : rebase_source : a173b07eb072348d042639ccfa636a2efeec9ae4
2017-06-06 18:13:51 +08:00
Wes Kocher 1af6d5cf57 Merge inbound to central, a=merge
UPGRADE_NSS_RELEASE
MozReview-Commit-ID: CBIFPwA5aNp

--HG--
extra : amend_source : 035a5be59d0046a643d0f836a95195e8c4ade4a6
2017-06-13 18:27:10 -07:00
Evelyn Hung 153b74fe52 Bug 1362858 - Part 2: Exclude script and style tags when building soft text.r=Ehsan
We keep checking if a node is a text node when building soft text and
set spell checking range in DoSpellCheck. However, simply checking text
node is not optimal, we could furthur exclude text node in script and
style tags. There might be more cases we could consider to exclude.

--HG--
extra : rebase_source : 7be2615c8baa5b7af425caa792398e2101d84744
2017-06-12 17:27:12 +08:00
Evelyn Hung 02f72b8b81 Bug 1362858 - Part 1: make word boundary check more consistent.r=Ehsan
We use ClassifyCharacter for detecting all possibilities of word
boudaries when building mRealWords but not when building soft text.
This inconsistency leads us repeatedly checking the same set of words
in some cases.

--HG--
extra : rebase_source : 01834f49584ee696a4caec240d16356db8efe5bd
2017-06-12 17:16:28 +08:00
Junior Hsu 96ffc639e8 Bug 1370454 - Part2: Expose runInTransaction in nsICookieService.idl, r=jduell 2017-06-06 05:36:00 +02:00
Junior Hsu ca036ac022 Bug 1370454 - Part1: remove dup test in test_cookie_async_failure.js, r=mak 2017-06-06 12:06:02 +08:00
Marco Bonardo 1d88de7d2f Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth
Avoids a thread-safety race condition on shutdown where we could try to finalize a statement twice.
Allows the async thread to be referenced until ShutdownAsyncThread, so async finalizers can make use of it.
Removes the no more useful mAsyncExecutionThreadIsAlive.
Nullifies the sqlite3_mutex pointer when the connection is closed, since it would be a dangling pointer.
Use a ScopeExit to ensure the connection and the mutex pointers are always nullified on failure.
Makes asyncClose bailout early if a Close method was already invoked before.
Makes AsyncInitDatabase not use AsyncClose to just shutdown the async thread.
Fixes various unfinalized statements in consumers code.
Makes mConnectionClosed better follow mDBConn status.
Replaces some mutex locking isClosed() calls with lockless isConnectionReadyOnThisThread.

MozReview-Commit-ID: 6sftFehsQTt

--HG--
extra : rebase_source : 2bf3088b500376e58e62e8f078d9950588adc649
2017-06-16 17:43:23 +02:00
Sylvestre Ledru dc49814273 Bug 1366882 - Fix a resource leak - CID 1402588 r=erahm
MozReview-Commit-ID: Al0Vlxewy0V

--HG--
extra : rebase_source : dd7c0af4dbec25d642e6cc0a71d53a207f5aca11
2017-05-24 19:39:26 +02:00
Henri Sivonen 432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Matt Brubeck 4842a8b989 Bug 1367839 - Add decrypt(s,ed,ing,able) to the spellcheck dictionary. r=Ehsan
MozReview-Commit-ID: 4jyTphO6Ja3

--HG--
extra : rebase_source : f7007f626b954b59d58098662ede1099786323e3
2017-05-25 11:34:32 -07:00
Masayuki Nakano 61af94acbd Bug 1367683 Optimize initializing nsRange r=smaug
nsRange::DoSetRange() adds/remove its root to/from mutation observer, initializes common ancestor, registers itself to the common ancestor, unregisters itself from old common ancestor, and notifies selection listeners of selection change.

However, those runtime cost is expensive but on the other hand, a lot of callers set both start and end of the range and that causes calling DoSetRange() twice.

This patch renames Set() to SetStartAndEnd() for easier to understand the meaning and make it call DoSetRange() only once.

MozReview-Commit-ID: FRV55tuBAgg

--HG--
extra : rebase_source : 67adf929cf119e2425f7d3741651217522094590
2017-05-30 13:18:25 +09:00
Xidorn Quan ac6cc1d36a Bug 1368418 part 3 - Remove nsCategoryImp. r=emk
MozReview-Commit-ID: 5qCoeqfM2s5

--HG--
extra : rebase_source : 6dc1693ce61bea4ec35469a3388c75a9fb64e5b3
2017-05-29 16:17:39 +10:00
JW Wang 1f5623c523 Bug 1365513 - Remove the call to AbstractThread::GetCurrent() in nsPermissionManager.cpp. r=mystor
See bug 1365483 for the rationale.

MozReview-Commit-ID: 4sWodnP5MYZ

--HG--
extra : rebase_source : 6a32073e50695ac8f4a540c83f9d2b5542b53585
extra : intermediate-source : 5d7189453d82844d55e3d90c79792b2edd7bdd0d
extra : source : 8b029c32f3512c9d8e92582312459a501594a6e8
2017-05-18 14:14:27 +08:00
Ehsan Akhgari 214e03003f Bug 1362791 - Enable testing permissions using URIs without having to mint principals; r=mystor
The permissions manager store uses principal origins with suffix in the
key entry, but for the API entry points where we accept a raw nsIURI, we
currently mint a new codebase principal with a blank OriginAttributes
only to read out the origin string effectively, since the suffix is
guaranteed to always be an empty string in this case.

This can be slow, so this patch adds a fast path to bypass minting a new
principal and uses ContentPrincipal::GenerateOriginNoSuffixFromURI() to
generate the origin string from the input nsIURI directly.
2017-05-20 00:59:09 -04:00
Nathan Froyd c1d1748428 Bug 1359490 - add an event loop spinning abstraction function; r=gerald
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
2017-05-15 09:34:19 -04:00
Michael Layzell d50b0587a8 Bug 1363243 - Avoid checking nsPermissionManager in nsContentBlocker when no preload permissions are set, r=ehsan
MozReview-Commit-ID: B8A8QXie8SX
2017-05-11 10:06:25 -04:00
Evelyn Hung c415d0931b Backout revision 20a9d741cdf4 (bug 1354641) for causing bug 1363176. a=me 2017-05-10 09:08:00 -04:00
Bill McCloskey c197e07ff2 Bug 1363560 - Name more runnables (r=mccr8)
MozReview-Commit-ID: 3hxZDA4JlTV
2017-05-09 21:53:25 -07:00
Ehsan Akhgari cd8e5781d1 Back out bug 1357107 since it broke a feature that we have no automated tests for... 2017-05-05 22:41:36 -04:00
Evelyn Hung 3f3888d09f Bug 1354641 - adjust the value of spell check heuristics. r=masayuki
This patch is mainly for adjusting the value of INLINESPELL_CHECK_TIMEOUT
from 50ms to 1ms. The value means how long the main thread is blocked
for spelling check, and 50ms is too long. It causes significant delays
when a rich content document is loading, and the user tries to
type immediately before spell checking is done.

With the INLINESPELL_CHECK_TIMEOUT setting to 1ms, it's possible to be
too short to less powerful machines. Therefore we add
INLINESPELL_MINIMUM_WORDS_BEFORE_TIMEOUT to ensure at least N words were
checked.

MozReview-Commit-ID: 1KYeFpggZGn

--HG--
extra : rebase_source : d7733dd37a923e6d6afb7f88174f352d28d4a3c4
2017-04-26 15:54:12 +08:00