Commit Graph

9873 Commits

Author SHA1 Message Date
Jonathan Hao
43b2addff0 Bug 1301617 - Add tests for firstPartyDomain and userContextId with nsIPermissionManager. r=baku
--HG--
extra : rebase_source : c2cdd6b300b750a8d964f73292d81d2fc74dd9cf
2016-09-11 20:36:00 -04:00
Umesh Panchaksharaiah
056d5a6135 Bug 1301629 - Fix incorrect parameter name in comments. r=ettseng
--HG--
extra : rebase_source : a45c6c9641ceb70301e8bcd957a3e21c95aef423
2016-09-14 19:57:20 +02:00
Yoshi Huang
58f3cc8643 Bug 1301274 - use default firstPartyDomain in PermissionManager. r=baku 2016-09-19 19:36:06 +08:00
Dragana Damjanovic
28e47547d6 Bug 1277895 - Remove one new line from http auth prompt message. r=dolske 2016-09-16 09:24:26 +02:00
Michael Layzell
36e08437d0 Bug 1018486 - Part 8: Various other changes, r=smaug
MozReview-Commit-ID: B0dsomkWgEk
2016-09-07 10:50:45 -04:00
Nicholas Nethercote
34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Sebastian Hengst
24761c4c2a Bug 1280775 - null check in removePermission to prevent crash: permission manager change. r=mystor
MozReview-Commit-ID: 1E67oEULEcs

--HG--
extra : rebase_source : 38df1862f185e263175f0f8487fbb9ceca795d68
2016-06-22 21:07:14 +02:00
Nicholas Nethercote
b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Emilio Cobos Álvarez
619cb14d87 Bug 1299066: Make NS_STYLE_DISPLAY_* an enum class. Prefer indexing instead of linear search in the frame constructor r=heycam,bz
The main renaming was generated with the following python script:

```

import sys
import re

CAMEL_CASE_REGEX = re.compile(r"(^|_|-)([A-Z])([A-Z]+)")
DISPLAY_REGEX = re.compile(r"\bNS_STYLE_DISPLAY_([^M][A-Z_]+)\b")

def to_camel_case(ident):
  return re.sub(CAMEL_CASE_REGEX,
                lambda m: m.group(2) + m.group(3).lower(), ident)

def constant_to_enum(constant):
  return "StyleDisplay::" + to_camel_case(constant) + ("_" if constant == "NONE" else "")

def process_line(line):
  return re.sub(DISPLAY_REGEX,
                lambda m: constant_to_enum(m.group(1)), line)

lines = []
with open(sys.argv[1], "r") as f:
  for line in f:
    lines.append(process_line(line))

with open(sys.argv[1], "w") as f:
  for line in lines:
    f.write(line)
```

And the following shell commands:

```
find . -name '*.cpp' -exec python display.py {} \;
find . -name '*.h' -exec python display.py {} \;
```

MozReview-Commit-ID: 91xYCbLC2Vf
2016-09-01 20:41:17 -07:00
Nicholas Nethercote
c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Tim Huang
19e68da566 Bug 1291652 - Part 3: Update tests for fetching originAttributes from the nsILoadInfo, but not from the nsILoadContext. r=mayhemer
--HG--
extra : rebase_source : ebb2beb2c1c8cde1ecb1f04c151c37ff6705077c
2016-08-22 08:41:00 -04:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Honza Bambas
d90344d529 Bug 1291700 - Allow negotiate/ntml to work when in the 'Never remember history' mode. r=jduell
--HG--
extra : rebase_source : 179a11fa222061f4c1c1cc2c1485ca49ca226d29
2016-08-16 06:24:00 -04:00
Nicholas Nethercote
ca40b738e4 Bug 1294620 - Use infallible XPIDL attribute getters more. r=erahm.
This makes a lot of code more compact, and also avoids some redundant nsresult
checks.

The patch also removes a handful of redundant checks on infallible setters.

--HG--
extra : rebase_source : f82426e7584d0d5cddf7c2524356f0f318fbea7d
2016-08-12 15:19:29 +10:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Nicholas Nethercote
bab6d17ebf Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_IMETHODIMP F() override;      --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final;         --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
2016-08-08 10:54:47 +10:00
Junior Hsu
5536544c0b Bug 1288049 - Canonicalize IPv4 for nsStandardURL, r=valentin 2016-08-09 03:18:00 +02:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Gabor Krizsanits
0c23e3d152 Bug 1285885 - Turn off PROMPT_ACTION permission hack for non-b2g builds. r=amarchesini 2016-08-01 14:45:41 +02:00
Sebastian Hengst
bf67e4cf3c Backed out changeset 2a22eca82a2d (bug 1285885) for xpcshell failure in extensions/cookie/test/unit_ipc/test_parent.js. r=backout 2016-08-01 14:12:50 +02:00
Gabor Krizsanits
11e4e3f5fd Bug 1285885 - Turn off PROMPT_ACTION permission hack for non-b2g builds. r=amarchesini 2016-08-01 12:27:20 +02:00
Ehsan Akhgari
c23cea6e98 Bug 1288977 - Update the en-US dictionary to SCOWL 2016.06.26 2016-07-26 12:43:51 -04:00
Fabrice Desré
7846da76d6 Bug 1287107 - Making transition alive with gaia as chrome:// r=bholley,fabrice
MozReview-Commit-ID: 9uVUrmuVFXQ

--HG--
extra : rebase_source : 20f6f0235667530c21aca4889b5d33e39c2d1a48
2016-03-03 09:58:47 -08:00
Carsten "Tomcat" Book
336105a0de merge mozilla-inbound to mozilla-central a=merge 2016-07-22 11:58:02 +02:00
Carsten "Tomcat" Book
c7846e126c Backed out changeset 16aa7041c009 (bug 1287107) for causing xpcshell and mac tests 2016-07-22 11:30:23 +02:00
Fabrice Desré
f5b619fb28 Bug 1287107 - Making transition alive with gaia as chrome:// r=bholley,fabrice
MozReview-Commit-ID: 9uVUrmuVFXQ

--HG--
extra : rebase_source : d0c19fcda5c72ecdce3b0d0bbbafa5a7954d7a4c
2016-03-03 09:58:47 -08:00
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson
b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Nathan Froyd
82f3460a41 Bug 1288390 - avoid a few more warnings in third-party code when compiling with clang; r=mshal 2016-07-21 18:58:37 -04:00
Jan Horak
f1cd3790fc Bug 890908 - Move Negotiate auth off main thread. r=mayhemer
--HG--
extra : rebase_source : ca85ad4bb099845b45a276823fe1abca68d384eb
2016-07-14 03:32:00 -04:00
Johann Hofmann
7a9543dd6c Bug 1206252 - Part 3: Add tests for nsIPermissionManager.getAllForURI. r=jdm
MozReview-Commit-ID: 8XQ11wWxZ3F

--HG--
extra : rebase_source : 8d0fda9065805190675bcaef6c11a4d777a8fc9e
2016-07-12 13:58:07 +02:00
Johann Hofmann
261d220621 Bug 1206252 - Part 1: Add a function to get all permissions by URI to nsIPermissionManager. r=jdm
MozReview-Commit-ID: KxnlBbmNJFZ

--HG--
extra : rebase_source : c931b331ea311c21adc8dcac9dbb88fee3a4a05f
2016-07-07 16:27:10 +02:00
Valentin Gosu
ef5a976694 Bug 1275746 - Fix tests that assume a HTTP url without a hostname is valid r=jrgm,MattN,jdm,gijs,smaug
MozReview-Commit-ID: DzRenakrcAG
2016-07-13 15:19:34 +03:00
Carsten "Tomcat" Book
0d2c8ddbb2 Merge mozilla-central to autoland 2016-07-11 11:51:22 +02:00
Daniel Holbert
ecdc48365b Bug 1285640: Move mozHunspell::CollectReports definition from .h file to .cpp file, to avoid clang 3.9 warning about static variable declared in header. r=njn
MozReview-Commit-ID: 8mUP6zYPhIO

--HG--
extra : rebase_source : 0ab4dbcb933f02451f7557e82f5d2d1967855988
2016-07-08 13:17:27 -07:00
Masayuki Nakano
7f30e926b8 Bug 1260651 part.60 editor/libeditor should export some headers which are required by other modules and other modules shouldn't use local include for them r=mccr8
MozReview-Commit-ID: FZSExwkHH2B
2016-07-08 14:03:31 +09:00
Masayuki Nakano
f382711dc3 Bug 1260651 part.59 Rename nsEditor to mozilla::EditorBase (and also their file names) r=mccr8
This patch also renames:

EditorInputEventDispatcher -> mozilla::EditorInputEventDispatcher

And some variable names are renamed from aEditor or mEditor to aEditorBase or mEditorBase for making their types clearer.

MozReview-Commit-ID: 2FCXWpLMn8e

--HG--
rename : editor/libeditor/nsEditor.cpp => editor/libeditor/EditorBase.cpp
rename : editor/libeditor/nsEditor.h => editor/libeditor/EditorBase.h
2016-07-08 13:10:13 +09:00
Masayuki Nakano
28ebbbd99b Bug 1260651 part.13 Rename nsAutoPlaceHolderBatch to mozilla::AutoPlaceHolderBatch r=mccr8
MozReview-Commit-ID: E8IlZjFSFRU
2016-06-23 18:51:19 +09:00
Masayuki Nakano
9771fba160 Bug 1260651 part.1 Rename nsEditorUtils to mozilla::EditorUtils (and their files too) r=mccr8
MozReview-Commit-ID: 7Z48LHQBRo7

--HG--
rename : editor/libeditor/nsEditorUtils.cpp => editor/libeditor/EditorUtils.cpp
rename : editor/libeditor/nsEditorUtils.h => editor/libeditor/EditorUtils.h
extra : rebase_source : e53301378ab6001cdb126c5cc8742b7cadfbbccc
extra : source : 0147a9c79800924614157f1fa74cda3b9397f688
2016-07-07 11:49:42 +09:00
karel-de-macil@wanadoo.fr
38508b4757 Bug 1278281 - add SSL functionnality to ldap query in autoconf. r=mkaply
--HG--
extra : rebase_source : 8bff064dbdbc8b28df1292288b089461e76f6b3c
2016-06-07 18:10:46 +02:00
Dave Huseby
01531fb1f2 Bug 1280497 - fixes bug 1280497 by removing the assert and adding missing code in permission manage. r= baku
fixes bug 1280497 by removing the assert and adding missing code in
permission manager.

--HG--
extra : amend_source : 35cf87cc1a13fbb9cbe135a004373783c681ed6b
2016-06-17 08:18:00 +02:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Nicholas Nethercote
ba949d4617 Bug 1278452 - Fix a typo in mozEnglishWordUtils::GetLanguage. r=ehsan.
|aLanguage| must be dereferenced when checked.

--HG--
extra : rebase_source : 8e5125c2eb99d66f731d58590a377b8238a81e70
2016-06-07 15:15:56 +10:00
Dragana Damjanovic
1de3e688ca Bug 1230462 - Change the authentiation dialog message. r=mayhemer,dolske,margaret,tanvi
--HG--
rename : toolkit/components/prompts/test/test_bug625187.html => toolkit/components/prompts/test/test_subresources_prompts.html
2016-06-06 01:06:00 +02:00
Carsten "Tomcat" Book
e8d8c705a1 Backed out changeset 490d3460a197 (bug 1230462) for test failures in test_modal_prompts.html
--HG--
rename : toolkit/components/prompts/test/test_subresources_prompts.html => toolkit/components/prompts/test/test_bug625187.html
2016-06-05 11:26:57 +02:00
Dragana Damjanovic
8d4a3a8b49 Bug 1230462 - Change the authentiation dialog message. r=mayhemer,dolske,margaret,tanvi
--HG--
rename : toolkit/components/prompts/test/test_bug625187.html => toolkit/components/prompts/test/test_subresources_prompts.html
extra : rebase_source : f37ed50a558040dee1958c215ccc5559637d2f84
2016-06-03 09:09:00 +02:00
Carsten "Tomcat" Book
71eb3110f9 merge mozilla-inbound to mozilla-central a=merge 2016-06-03 12:00:06 +02:00
Carsten "Tomcat" Book
8f9e440056 Backed out changeset 1fe1c3b03d08 (bug 890908) on developer request 2016-06-03 05:51:06 +02:00
Tim Huang
8ec727cd19 Bug 1267910 - Part 2: Update all existing functions of add() and getCookiesFromHost() to make them origin attributes aware. r=jdm, r=mratcliffe
--HG--
extra : rebase_source : 288c9cab8340c5cc06861d4f2c7ee43ae4de608e
2016-05-25 11:54:21 +08:00
Eric Rahm
d16e0561bb Bug 1275064 - Use unsigned type in RealWord bitfield. r=froydnj 2016-05-25 12:15:27 -07:00