Commit Graph

133 Commits

Author SHA1 Message Date
Bill McCloskey
f69608368b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Milan Sreckovic
1b0959ac1f Bug 789945: Part 4. Explicitly make some pref save be blocking calls. r=bsmedberg
MozReview-Commit-ID: 1MEp7o65HAV
2017-06-14 13:38:17 -04:00
Nicholas Nethercote
c768a954ae Bug 1358320 - Make TimeStamp::ProcessCreation()'s outparam optional. r=gsvelto.
TimeStamp::ProcessCreations()'s aIsInconsistent outparam is ignored by the
majority of its caller. This patch makes it optional. Notably, this makes
ProcessCreation() easier to use in a constructor's initializer list.
2017-04-26 14:55:54 +10:00
Ehsan Akhgari
15aee0c599 Bug 1356922 - Part 1: Replace the next TabParent global pointer with per-window/tab next TabParent ID; r=billm,mconley
This patch replaces the usage of sNextTabParent pointer to store the next
PBrowser parent actor to be used by the next frame loader with the
following information:

  * In the case where the content JS has requested a new tab, the ID of the
    next TabParent will be stored on the <xul:browser> element.
  * In the case where the content JS has requested a new window, the ID of
    the next TabParent will be stored on the created nsXULWindow.
2017-04-24 14:18:29 -04:00
Chris Peterson
fab44b40b9 Bug 1356843 - Fix -Wcomma warnings in toolkit/. r=mossop
clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements or calling a function for side effects within an expression. Check NS_SUCCEEDED() to use HasMoreElement() in an expression and confirm that it actually returned a legitimate out parameter.

toolkit/components/startup/nsAppStartup.cpp:436:58 [-Wcomma] possible misuse of comma operator here
toolkit/components/statusfilter/nsBrowserStatusFilter.cpp:165:66 [-Wcomma] possible misuse of comma operator here
toolkit/xre/CreateAppData.cpp:60:51 [-Wcomma] possible misuse of comma operator here

MozReview-Commit-ID: HuZRoOjQTGj
2017-04-05 01:23:45 -07:00
David Major
7c0497b430 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo
2017-03-14 15:26:27 +13:00
Iris Hsiao
22d2818760 Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major
a660713d2b Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo
2017-03-14 15:26:27 +13:00
Masatoshi Kimura
3d9592a4bb Bug 1331820 - Fix misuse of NS_NewNativeLocalFile in nsAppStartup.cpp. r=mossop
MozReview-Commit-ID: 76d2Vmj9vfV
2017-01-21 15:42:02 +09:00
Andrea Marchesini
1d56111463 Bug 1322440 - Get rid of contextFlags in nsIWindowCreator2, r=smaug 2016-12-07 16:20:08 -10:00
Michael Layzell
28edda560a Bug 1303196 - Part 2: Connect the DocGroup and TabGroup objects to nsGlobalWindow and nsDocument, ensuring that Opener is set early enough that it is correct, r=smaug
MozReview-Commit-ID: 3rZfLw3dXkF
2016-10-27 15:53:35 -04:00
Nicholas Nethercote
887efe04d5 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.
2016-09-01 15:01:16 +10:00
Stephen A Pohl
47663fa8ad Bug 1250901: Relaunch applications using NSTask instead of posix_spawnp on OSX. r=mstange 2016-08-31 18:56:45 -04:00
Iris Hsiao
744a9727f4 Backed out changeset 4a42968b790d (bug 1250901) for Mochitest M(oth) failures on OS X 2016-08-30 16:54:29 +08:00
Stephen A Pohl
9b11daf1c0 Bug 1250901: Relaunch applications using NSTask instead of posix_spawnp on OSX. r=mstange 2016-08-29 21:14:36 -04:00
Nicholas Nethercote
1f65390cc9 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.
2016-08-08 12:18:10 +10:00
Mike Conley
d26954a2e0 Bug 1278985 - Remove unused URL arg from CreateChromeWindow2. r=mrbkap
MozReview-Commit-ID: I1H2WZeoHTJ
2016-04-27 16:19:25 -04:00
Sebastian Hengst
9c3e9478da Backed out changeset e8b366f388f6 (bug 1278985) for build bustage on a CLOSED TREE 2016-06-09 00:24:15 +02:00
Mike Conley
3996a2b516 Bug 1278985 - Remove unused URL arg from CreateChromeWindow2. r=mrbkap
This isn't used at all internally, and was probably used by people
embedding Gecko back when Gecko was more embeddable.

For now, it's just noise - I figure we can remove it.

MozReview-Commit-ID: I1H2WZeoHTJ
2016-04-27 16:19:25 -04:00
Mike Conley
c7e3e01c86 Bug 1275261 - Assert that we have no windows to iterate on shutdown if we've apparently closed them all. r=bsmedberg,smaug
MozReview-Commit-ID: Lx9YbGdb90m
2016-06-02 10:43:57 -07:00
Kyle Huey
a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Andrea Marchesini
0d673e74bf Bug 1264469 - Would be nice to be able to open 2 firefox sessions with a different profiles from about:profiles, r=smaug 2016-04-19 12:00:59 +02:00
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Kyle Huey
8f8794e1c7 Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Jeff Walden
fc993827aa Bug 1158399 - Expose the [[DateValue]] field in Date objects only through a ClippedTime class that enforces prior TimeClip-ing on the given value. r=evilpie, r=bz, r=dhylands, r=mt, r=froydnj, r=khuey, r=baku, r=smaug 2015-05-01 19:12:52 -07:00
Ted Mielczarek
4ae2a144e0 bug 1171580 - Don't create a hidden window on iOS. r=froydnj 2015-02-27 12:32:43 -05:00
Shelly Lin
547499e84d Bug 1138290 - New option in WindowWatcher.openWindow to open another toplevel window on b2g. r=roc 2015-04-29 17:25:26 +08:00
Kartikaya Gupta
1083f1bef3 Back out cset cfb6c36caf63 (bug 681733) for breaking some add-ons. r=me 2015-04-23 17:30:42 -04:00
Kartikaya Gupta
ebe4a3e37e Bug 1039866 - Rip out a bunch of metro-only code. r=jimm,gavin,rstrong 2015-04-23 15:10:30 -04:00
Kartikaya Gupta
85e1af03d5 Bug 681733 - Don't use hiddenwindow.html on android. r=mfinkle 2015-04-16 22:14:41 -04:00
Tom Schuster
7c3552a7df Bug 1125356 - Use JS_NewPlainObject in the browser. r=bz 2015-01-24 16:38:08 +01:00
Panos Astithas
8ae89989dc Bug 1086936 part 2 - Add a flag to nsIAppStartup::quit that restarts the browser without using the same profile and use it for the Aurora UI switch. r=bsmedberg 2014-10-27 21:46:56 +02:00
Ehsan Akhgari
d282557bca Bug 1061061 - Fix more bad implicit constructors in misc. code; r=bsmedberg 2014-09-02 18:24:24 -04:00
David Rajchenbach-Teller
4b063497b2 Bug 1034514 - Record quit-application and profile-before-change in the timeline. r=froydnj 2014-08-22 07:27:00 +02:00
Mike Conley
a410528ad3 Bug 1021466 - Part 2: Make it possible to pass in an nsITabParent when opening windows, and then stash that nsITabParent in the newly created chrome docshell. r=smaug. 2014-06-05 22:51:14 -04:00
Ms2ger
bef4398890 Bug 968804 - Part b: Add outer window assertions to {Can,Force,Final}Close; r=peterv 2014-05-20 21:50:58 +02:00
Birunthan Mohanathas
eeb9aaaa94 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Aaron Klotz
0c4a7687a4 Bug 935482: New IOInterposer observer for recording main thread I/O to file; r=froydnj 2014-04-19 14:28:02 -06:00
Terrence Cole
ccf4d8dd9b Bug 959787 - Handlify JS_DefineProperty; r=Waldo, r=bz 2014-01-21 18:11:17 -08:00
David Rajchenbach-Teller
3c52d43e86 Bug 936630 - Timeline event sessionRestoreInit. r=ttaubert, r=froydnj 2014-04-04 08:34:24 -04:00
Aaron Klotz
66884a5f0b Bug 976000: Add info to Telemetry.fileIOReports to differentiate between start/normal/shutdown I/O; r=froydnj 2014-03-18 16:07:35 -06:00
Terrence Cole
5403e658ff Bug 959787 - Handlify several JSAPI interfaces that can GC, Part 3; r=sfink 2014-01-16 09:48:58 -08:00
Tom Schuster
4a7dd51a60 Bug 939294 - Change xpidl jsval to handles. r=gabor,bz,khuey,bsmedberg,terrence 2014-01-09 18:39:36 +01:00
Ehsan Akhgari
5329e49f60 Merge m-c into b2g-inbound 2014-01-04 12:17:52 -05:00
Ehsan Akhgari
68bfe70f09 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Fabrice Desré
f4f6ab378d Bug 956186 - Don't use hiddenwindow.html on b2g r=roc 2014-01-03 18:56:52 -08:00
Marina Samuel
201a2f1800 Bug 934032 - Add View on Metro feature to Desktop Firefox in Australis. r=bbondy 2013-11-19 13:06:58 -05:00
Marina Samuel
89bd827370 Bug 924911 - Change View on Desktop feature to be switch to Desktop feature. r=bbondy 2013-11-19 12:47:23 -05:00
Jonas Finnemann Jensen
cf099c0754 Bug 902587 - Part 2A: Refactor late-write-checks as client of IO Interposer. r=BenWa 2013-11-05 07:45:20 -05:00