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

2709 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart b51e0fd0cc Bug 1489944 - Fixed some std::move warnings - r=froydnj
> dom/media/gmp/CDMStorageIdProvider.cpp(63,10):  warning:
> local variable 'storageId' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClip.cpp(581,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClipChain.cpp(88,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/nsDisplayList.cpp(179,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> gfx/thebes/gfxWindowsPlatform.cpp(454,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Will remove std::move().

> gfx/thebes/gfxFontEntry.cpp(245,20):  warning:
> local variable 'name' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> netwerk/cookie/nsCookieService.cpp(4460,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
GetPathFromURI() result is stored in an nsAutoCString, so it might as well return that type.

> toolkit/components/extensions/WebExtensionPolicy.cpp(462,12):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
> toolkit/components/extensions/WebExtensionPolicy.cpp(475,10):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
`result` may be empty or may be arbitrarily long, so I'll use nsCString inside the function.

> toolkit/xre/CmdLineAndEnvUtils.h(349,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Returning an UniquePtr, will remove std::move().
Also will `return s` instead of `return nullptr` when `(!s)`, to avoid extra construction which could also prevent elision (not entirely sure, but it's at least not worse!); and it's clearer that the two `return`s return the same already-constructed on-stack object.

> tools/profiler/core/shared-libraries-win32.cc(111,10):  warning:
> local variable 'version' will be copied despite being returned by name [-Wreturn-std-move]
nsPrintfCString -> nsCString, will add std::move().

> xpcom/glue/FileUtils.cpp(179,10):  warning:
> local variable 'fullName' will be copied despite being returned by name [-Wreturn-std-move]
> xpcom/glue/FileUtils.cpp(209,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
nsAuto{,C}String -> ns{,C}String, will add std::move().

This allowed removals of 'AllowCompilerWarnings' from layout/painting,
netwerk/cookie, and toolkit/components/extensions.

Differential Revision: https://phabricator.services.mozilla.com/D5425

--HG--
extra : moz-landing-system : lando
2018-09-10 15:51:48 +00:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Panos Astithas f041fb6e3c Bug 1461851 - Properly add the source URL in the profiler metadata. r=glandium
MozReview-Commit-ID: 53M4bGolmJk

--HG--
extra : rebase_source : f0da66755c92d2937f5fad1f5784f9a81829c951
2018-05-15 16:44:44 -07:00
Gurzau Raul bcd412f2a9 Backed out changeset 602bdd9d5a96 (bug 1461851) for linting failures on /checkouts/gecko/build/appini_header.py on a CLOSED TREE 2018-05-30 19:03:50 +03:00
Panos Astithas 9be1c58dd1 Bug 1461851 - Properly add the source URL in the profiler metadata. r=glandium
MozReview-Commit-ID: 53M4bGolmJk

--HG--
extra : rebase_source : 17c2f3922d04b1ee7e168837f4440bb1b0abc218
2018-05-15 16:44:44 -07:00
Masatoshi Kimura 231ace04e1 Bug 1428557 - Implement wrappers in FileUtils. r=froydnj
These methods will be used in subsequent patches.

MozReview-Commit-ID: EqCpRbn2Y5Y

--HG--
extra : rebase_source : 4b6c2388acb31490a981ca08ba34d4e69c09eddf
2018-02-02 23:25:10 +09:00
Sylvestre Ledru 424664ff30 Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman
MozReview-Commit-ID: 3v8D600g8St

--HG--
extra : rebase_source : 34ea6f9868c1b322076c24daa75dc33e27b6704e
2018-01-10 08:52:04 +01:00
Sylvestre Ledru f8b1d9ab46 Bug 1278282 - update of the moz.build files to remove gtk2 references r=lsalzman
MozReview-Commit-ID: FO1wEHzOkuN

--HG--
extra : rebase_source : ac7e61cf47d013de882048740c889735a0a7cad8
2018-01-10 10:04:59 +01:00
Sylvestre Ledru 5de63ef061 Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 5orfnoude7h

--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Cosmin Sabou c191e25cf5 Merge mozilla-inbound to mozilla-central r=merge a=merge 2017-12-08 11:56:44 +02:00
Eric Rahm 9c38308878 Bug 1423773 - Part 2: Remove nsStringGlue.h. r=glandium
nsStringGlue.h is no longer used, we can remove it.

--HG--
extra : rebase_source : dd037f13a3faae1cd5bbeca77107b798deb665e3
2017-12-06 16:55:06 -08:00
Mike Hommey abab5abf88 Bug 1423803 - Turn mozilla::fallible into an alias for std::nothrow. r=njn
The std::nothrow variant of operator new is effectively a fallible
operator new. It is used in third party code.

The duplication with our own fallible operator new is unfortunate, and
we can reduce it by making one an alias of the other.

We keep the fallible library as a dummy on Android because bug 1423802
induces some linking problems.

--HG--
extra : rebase_source : d7b915aaafde40057e87b7ad4bbd82d348e4f12d
2017-12-07 11:32:29 +09:00
Mike Hommey 9a85da277f Bug 1423094 - Remove xpcom_staticruntime. r=gps
--HG--
extra : rebase_source : 6a0fe5081ce7140038c95195239018203804859b
2017-12-05 15:39:52 +09:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Nicholas Nethercote e99e711d3f Bug 1382099 - Remove MOZ_WIDGET_GONK from xpcom/. r=erahm.
As well as the straightforward things, this lets us remove ReadSysFile and
WriteSysFile, which in turn lets us remove TestFileUtils.cpp.

--HG--
extra : rebase_source : fc90c05352e654ffc41009d8504a9c54f394fc3f
2017-07-21 10:45:39 +10:00
Benjamin Smedberg ac59a7e7f3 Bug 1332639 followup. I apparently didn't actually remove the nsStringAPI.* files, but that was the intention, r=oops
MozReview-Commit-ID: GJBNWAmO6iy

--HG--
extra : rebase_source : 1ebfee5b368d0358ed1dad46ff84cc5bf57bb834
2017-03-02 09:23:08 -05:00
Benjamin Smedberg d9c7494134 Bug 1332639 - Remove the external string API: nsStringAPI.h/cpp and nsEmbedString.h, r=glandium
MozReview-Commit-ID: 9dZcmMAI0Vk

--HG--
extra : rebase_source : 5561cf7f3318c60f082fff02c5e78aba661f6437
2017-02-27 11:41:52 -05:00
Honza Bambas 7478e3a8b9 Bug 1340577 - Add release-grade assertions to various XPCOM string API implementations to avoid input causing an overflow. r=froydnj
--HG--
extra : rebase_source : af6aaf66863cb6a981a4d8f0deeac8e0f40278c1
2017-02-21 11:38:00 -05:00
David Parks 26437f4ecd Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.

--HG--
extra : rebase_source : 4d5637bcdbeae605b0b99e9192598d48f371b698
2017-02-14 15:08:40 -08:00
Sebastian Hengst 68e7240c0c Backed out changeset 71b9ac06a60a (bug 1284897) 2017-02-21 23:13:29 +01:00
David Parks 82eb0f3fdd Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.

--HG--
extra : rebase_source : e34e8b50101cc40ded26e80791052123b24c8243
extra : histedit_source : 69c9b2dc91546adbfdad03b5d43842809191ffb9
2017-02-14 15:08:40 -08:00
Phil Ringnalda 87ae1a50e4 Backed out 5 changesets (bug 1284897) for mozilla::SandboxPermissions::RemovePermissionsForProcess crashes
Backed out changeset 19b2fcee13a9 (bug 1284897)
Backed out changeset a5171791437f (bug 1284897)
Backed out changeset 3ea8b8a18515 (bug 1284897)
Backed out changeset 21497a4e3bde (bug 1284897)
Backed out changeset 12e17d5f0fa9 (bug 1284897)
2017-02-16 22:14:15 -08:00
David Parks e9bcaf4cbe Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.
2017-02-14 15:08:40 -08:00
David Major 6feec2967a Bug 1339968 - Remove NS_MULTILINE_LITERAL_STRING. r=froydnj 2017-02-17 15:24:11 +13:00
Sylvestre Ledru 5bedb078f1 Bug 1338086 - Remove useless else blocks in order to reduce complexity in xpcom/ r=froydnj
MozReview-Commit-ID: JUJARn5Nspp

--HG--
extra : rebase_source : c719d19215fb26ace822269c2a28faf5cf35ffbb
2017-02-09 15:31:35 +01:00
Benjamin Smedberg ca77995f5d Bug 1333826 - Remove SDK_FILES, SDK_LIBRARY, and related is_sdk support in the build goop, r=mshal
MozReview-Commit-ID: 52vPyDXdFte

--HG--
extra : rebase_source : c3217730bb70eb7319152dd07536b12f49d6a597
2017-01-30 11:24:10 -05:00
Wes Kocher 8439919627 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 7eiveonzAo4
2017-01-24 16:11:28 -08:00
Benjamin Smedberg e56d1ab394 Bug 1332631 part H - move gtests from xpcom/glue to xpcom/tests, and unify the two TestThreadUtils.cpp into one file, r=froydnj
MozReview-Commit-ID: 2idOXKJOnuW

--HG--
rename : xpcom/glue/tests/gtest/TestArray.cpp => xpcom/tests/gtest/TestArray.cpp
rename : xpcom/glue/tests/gtest/TestGCPostBarriers.cpp => xpcom/tests/gtest/TestGCPostBarriers.cpp
rename : xpcom/glue/tests/gtest/TestNsDeque.cpp => xpcom/tests/gtest/TestNsDeque.cpp
extra : rebase_source : f5b3dc2f338c056e96c9fc42d9cdb4d2f7128116
extra : histedit_source : 9d85be5854af26a214aff4e1027415b9472e21a1
2017-01-20 15:22:23 -05:00
Benjamin Smedberg 9b43ba6de7 Bug 1332631 part G - file moves from xpcom/glue to xpcom/components, and remove GenericModule which is no longer useful, r=froydnj
MozReview-Commit-ID: 5NvfKRAlZqs

--HG--
rename : xpcom/glue/GenericFactory.cpp => xpcom/components/GenericFactory.cpp
rename : xpcom/glue/GenericFactory.h => xpcom/components/GenericFactory.h
rename : xpcom/glue/nsCategoryCache.cpp => xpcom/components/nsCategoryCache.cpp
rename : xpcom/glue/nsCategoryCache.h => xpcom/components/nsCategoryCache.h
rename : xpcom/glue/nsComponentManagerUtils.cpp => xpcom/components/nsComponentManagerUtils.cpp
rename : xpcom/glue/nsComponentManagerUtils.h => xpcom/components/nsComponentManagerUtils.h
rename : xpcom/glue/nsServiceManagerUtils.h => xpcom/components/nsServiceManagerUtils.h
extra : rebase_source : 2f9e4b8de99c2835c4322282b0227ed3f833c285
extra : histedit_source : 45033773c304696050a649e3fbde1ecb33ec1fea
2017-01-20 14:41:10 -05:00
Benjamin Smedberg 5030045d16 Bug 1332631 part F - move nsXPTCUtils.h to xpcom/reflect/xptcall, r=froydnj
MozReview-Commit-ID: 7h69wKKdvwe

--HG--
rename : xpcom/glue/nsXPTCUtils.h => xpcom/reflect/xptcall/nsXPTCUtils.h
extra : rebase_source : 5939339f35e842e025538fed616d405f15749d82
extra : histedit_source : 99784f8fad561d895dfa09ff996d120bacc325fd
2017-01-20 14:25:46 -05:00
Benjamin Smedberg 4b13a903e5 Bug 1332631 part E - file moves from xpcom/glue to xpcom/string, r=froydnj
MozReview-Commit-ID: AGHVJ5uYOoI

--HG--
rename : xpcom/glue/nsTextFormatter.cpp => xpcom/string/nsTextFormatter.cpp
rename : xpcom/glue/nsTextFormatter.h => xpcom/string/nsTextFormatter.h
extra : rebase_source : 18e1bf4f93d9174ff6808ea08b22f3c308df7da1
extra : histedit_source : 3436c455836aeb2583dd1418a1bad259cb779af1
2017-01-20 14:19:22 -05:00
Benjamin Smedberg 60cd8481eb Bug 1332631 part D - file moves from xpcom/glue to xpcom/threads, r=froydnj
MozReview-Commit-ID: kDBGvlYjyW

--HG--
rename : xpcom/glue/BlockingResourceBase.cpp => xpcom/threads/BlockingResourceBase.cpp
rename : xpcom/glue/BlockingResourceBase.h => xpcom/threads/BlockingResourceBase.h
rename : xpcom/glue/CondVar.h => xpcom/threads/CondVar.h
rename : xpcom/glue/DeadlockDetector.h => xpcom/threads/DeadlockDetector.h
rename : xpcom/glue/MainThreadUtils.h => xpcom/threads/MainThreadUtils.h
rename : xpcom/glue/Monitor.h => xpcom/threads/Monitor.h
rename : xpcom/glue/Mutex.h => xpcom/threads/Mutex.h
rename : xpcom/glue/ReentrantMonitor.h => xpcom/threads/ReentrantMonitor.h
rename : xpcom/glue/nsProxyRelease.cpp => xpcom/threads/nsProxyRelease.cpp
rename : xpcom/glue/nsProxyRelease.h => xpcom/threads/nsProxyRelease.h
rename : xpcom/glue/nsThreadUtils.cpp => xpcom/threads/nsThreadUtils.cpp
rename : xpcom/glue/nsThreadUtils.h => xpcom/threads/nsThreadUtils.h
extra : rebase_source : 5f908c04835192c1949bed0828d7bd086e795f64
extra : histedit_source : 26a8dbfd9b082c9200fbe7b176f6593e406c98ce
2017-01-20 14:13:57 -05:00
Benjamin Smedberg 2b3617b084 Bug 1332631 part C - file moves from xpcom/glue to xpcom/ds, r=froydnj
MozReview-Commit-ID: 9ZhC5bROWdO

--HG--
rename : xpcom/glue/Observer.h => xpcom/ds/Observer.h
rename : xpcom/glue/PLDHashTable.cpp => xpcom/ds/PLDHashTable.cpp
rename : xpcom/glue/PLDHashTable.h => xpcom/ds/PLDHashTable.h
rename : xpcom/glue/nsArrayEnumerator.cpp => xpcom/ds/nsArrayEnumerator.cpp
rename : xpcom/glue/nsArrayEnumerator.h => xpcom/ds/nsArrayEnumerator.h
rename : xpcom/glue/nsArrayUtils.cpp => xpcom/ds/nsArrayUtils.cpp
rename : xpcom/glue/nsArrayUtils.h => xpcom/ds/nsArrayUtils.h
rename : xpcom/glue/nsBaseHashtable.h => xpcom/ds/nsBaseHashtable.h
rename : xpcom/glue/nsCOMArray.cpp => xpcom/ds/nsCOMArray.cpp
rename : xpcom/glue/nsCOMArray.h => xpcom/ds/nsCOMArray.h
rename : xpcom/glue/nsClassHashtable.h => xpcom/ds/nsClassHashtable.h
rename : xpcom/glue/nsDataHashtable.h => xpcom/ds/nsDataHashtable.h
rename : xpcom/glue/nsDeque.cpp => xpcom/ds/nsDeque.cpp
rename : xpcom/glue/nsDeque.h => xpcom/ds/nsDeque.h
rename : xpcom/glue/nsEnumeratorUtils.cpp => xpcom/ds/nsEnumeratorUtils.cpp
rename : xpcom/glue/nsEnumeratorUtils.h => xpcom/ds/nsEnumeratorUtils.h
rename : xpcom/glue/nsHashKeys.h => xpcom/ds/nsHashKeys.h
rename : xpcom/glue/nsInterfaceHashtable.h => xpcom/ds/nsInterfaceHashtable.h
rename : xpcom/glue/nsJSThingHashtable.h => xpcom/ds/nsJSThingHashtable.h
rename : xpcom/glue/nsPointerHashKeys.h => xpcom/ds/nsPointerHashKeys.h
rename : xpcom/glue/nsQuickSort.cpp => xpcom/ds/nsQuickSort.cpp
rename : xpcom/glue/nsQuickSort.h => xpcom/ds/nsQuickSort.h
rename : xpcom/glue/nsRefPtrHashtable.h => xpcom/ds/nsRefPtrHashtable.h
rename : xpcom/glue/nsTArray-inl.h => xpcom/ds/nsTArray-inl.h
rename : xpcom/glue/nsTArray.cpp => xpcom/ds/nsTArray.cpp
rename : xpcom/glue/nsTArray.h => xpcom/ds/nsTArray.h
rename : xpcom/glue/nsTArrayForwardDeclare.h => xpcom/ds/nsTArrayForwardDeclare.h
rename : xpcom/glue/nsTHashtable.h => xpcom/ds/nsTHashtable.h
rename : xpcom/glue/nsTObserverArray.cpp => xpcom/ds/nsTObserverArray.cpp
rename : xpcom/glue/nsTObserverArray.h => xpcom/ds/nsTObserverArray.h
rename : xpcom/glue/nsTPriorityQueue.h => xpcom/ds/nsTPriorityQueue.h
extra : rebase_source : 5f0638e3268acb932e1a8d3f499d283bc1922acd
extra : histedit_source : dcea9485885877bb02f95a1ecc627465a507f757
2017-01-20 13:59:21 -05:00
Benjamin Smedberg d478e7c99f Bug 1332631 part B - file moves from xpcom/glue to xpcom/base, r=froydnj
MozReview-Commit-ID: ARS1aTugYjl

--HG--
rename : xpcom/glue/AutoRestore.h => xpcom/base/AutoRestore.h
rename : xpcom/glue/EnumeratedArrayCycleCollection.h => xpcom/base/EnumeratedArrayCycleCollection.h
rename : xpcom/glue/IntentionalCrash.h => xpcom/base/IntentionalCrash.h
rename : xpcom/glue/nsCOMPtr.cpp => xpcom/base/nsCOMPtr.cpp
rename : xpcom/glue/nsCOMPtr.h => xpcom/base/nsCOMPtr.h
rename : xpcom/glue/nsCRTGlue.cpp => xpcom/base/nsCRTGlue.cpp
rename : xpcom/glue/nsCRTGlue.h => xpcom/base/nsCRTGlue.h
rename : xpcom/glue/nsClassInfoImpl.cpp => xpcom/base/nsClassInfoImpl.cpp
rename : xpcom/glue/nsCycleCollectionNoteChild.h => xpcom/base/nsCycleCollectionNoteChild.h
rename : xpcom/glue/nsCycleCollectionNoteRootCallback.h => xpcom/base/nsCycleCollectionNoteRootCallback.h
rename : xpcom/glue/nsCycleCollectionParticipant.cpp => xpcom/base/nsCycleCollectionParticipant.cpp
rename : xpcom/glue/nsCycleCollectionParticipant.h => xpcom/base/nsCycleCollectionParticipant.h
rename : xpcom/glue/nsCycleCollectionTraversalCallback.h => xpcom/base/nsCycleCollectionTraversalCallback.h
rename : xpcom/glue/nsDebug.h => xpcom/base/nsDebug.h
rename : xpcom/glue/nsIClassInfoImpl.h => xpcom/base/nsIClassInfoImpl.h
rename : xpcom/glue/nsID.cpp => xpcom/base/nsID.cpp
rename : xpcom/glue/nsID.h => xpcom/base/nsID.h
rename : xpcom/glue/nsIInterfaceRequestorUtils.cpp => xpcom/base/nsIInterfaceRequestorUtils.cpp
rename : xpcom/glue/nsIInterfaceRequestorUtils.h => xpcom/base/nsIInterfaceRequestorUtils.h
rename : xpcom/glue/nsINIParser.cpp => xpcom/base/nsINIParser.cpp
rename : xpcom/glue/nsINIParser.h => xpcom/base/nsINIParser.h
rename : xpcom/glue/nsISupportsImpl.cpp => xpcom/base/nsISupportsImpl.cpp
rename : xpcom/glue/nsISupportsImpl.h => xpcom/base/nsISupportsImpl.h
rename : xpcom/glue/nsISupportsUtils.h => xpcom/base/nsISupportsUtils.h
rename : xpcom/glue/nsIWeakReferenceUtils.h => xpcom/base/nsIWeakReferenceUtils.h
rename : xpcom/glue/nsMemory.cpp => xpcom/base/nsMemory.cpp
rename : xpcom/glue/nsMemory.h => xpcom/base/nsMemory.h
rename : xpcom/glue/nsTWeakRef.h => xpcom/base/nsTWeakRef.h
rename : xpcom/glue/nsVersionComparator.cpp => xpcom/base/nsVersionComparator.cpp
rename : xpcom/glue/nsVersionComparator.h => xpcom/base/nsVersionComparator.h
rename : xpcom/glue/nsWeakReference.cpp => xpcom/base/nsWeakReference.cpp
rename : xpcom/glue/nsWeakReference.h => xpcom/base/nsWeakReference.h
extra : rebase_source : df11b181f383b70ffe5051716d63ed11b98be53b
extra : histedit_source : 6d0743fac0562e4676e44a52f0e85375fb4a44ff
2017-01-23 09:24:01 -05:00
Mike Hommey 713aafb052 Bug 1333081 - Avoid using the STL in nsXPCOMGlue.cpp to avoid allocator mismatch on Windows. r=froydnj
--HG--
extra : rebase_source : a65a5cf3d197d88799d24514c6d860b2e6c111ab
2017-01-24 08:44:42 +09:00
Phil Ringnalda bcbe2e1fcc Merge m-c to autoland 2017-01-20 19:15:16 -08:00
Mike Hommey 45bb38d482 Bug 1332523 - Make GetBootstrap take the path to an arbitrary file next to libxul. r=bsmedberg
The FileExists check can be removed because the code loading the library
will handle that case already.

--HG--
extra : rebase_source : bac53d3f88ed1dd716ee1340d40dae42becdfdf0
2017-01-13 09:27:39 +09:00
Mike Hommey 11a4734e0d Bug 1332523 - Remove nsXPCOMGlue.h. r=bsmedberg
--HG--
extra : rebase_source : 7a0b2441f768cbdef1a5b51139f8ecd4a6fde0c1
2017-01-13 07:56:05 +09:00
Boris Zbarsky e0b13280b1 Bug 1332531. Improve the documentation for cycle collector skippability bits. r=smaug,mccr8 2017-01-20 12:59:15 -05:00
Benjamin Smedberg 11e200c0c5 Bug 1306329 - Don't build the dependent XPCOM glue. r=glandium
--HG--
extra : rebase_source : 918474e0f4c831db5ce2f3070414f928fa489ddb
2016-10-26 13:55:51 -04:00
Wes Kocher d4ced30f67 Backed out 4 changesets (bug 1306329) for 3000+ hazards a=backout
Backed out changeset 1c2f51ce3faf (bug 1306329)
Backed out changeset 6bb17b9a62d8 (bug 1306329)
Backed out changeset 377ca1419f1a (bug 1306329)
Backed out changeset ad4e531c7070 (bug 1306329)

MozReview-Commit-ID: KJAxdyJeJ6J
2017-01-17 17:55:24 -08:00
Benjamin Smedberg 3caf6299aa Bug 1306329 - Don't build the dependent XPCOM glue. r=glandium
--HG--
extra : rebase_source : 918474e0f4c831db5ce2f3070414f928fa489ddb
2016-10-26 13:55:51 -04:00
Mike Hommey 6da931c3c8 Bug 1306327 - Remove everything related to frozen functions from the XPCOM glue. r=bsmedberg
Now that nothing is using those functions, we can remove them and limit
the scope of the standalone glue to initialize the new Bootstrap API.

--HG--
extra : rebase_source : b73845a207f8d6e632c46d089a00b7a67e1648fc
2017-01-10 17:12:43 +09:00
Mike Hommey bebd095c4c Bug 1306327 - Use the new XRE Bootstrap API in Firefox for Android. r=bsmedberg
Here, we also modify APKOpen to use the XPCOM glue loading process
instead of custom symbol resolution, so that the Bootstrap API can be
used in a more straightforward manner.

--HG--
extra : rebase_source : 55037ba30ca66a090b73923a3ce8df5b054bf47a
2016-12-17 06:48:01 +09:00
Mike Hommey 5f3d2e8810 Bug 1306327 - Add a new XRE Bootstrap API that wraps all the XRE methods. r=bsmedberg
This is the first step towards changing how nsBrowserApp and other current
XPCOM glue users start up Gecko.

The goal here is to expose the same API via a single object with a
VTable instead of the current XPCOM glue machinery. Instead of creating
an entirely new API and changing everything to use it, we go forward
with smaller steps for a more comprehensible transition.

--HG--
extra : rebase_source : c2cf90ab3bb812b9ea75c70c9766f1a47ea50828
2016-12-15 16:46:18 +09:00
Mike Hommey a92655a398 Bug 1306327 - Remove XPCOMGlueEnablePreload. r=froydnj
Back in bug 632404, when the function was added, preloading was
conditional. But after some A/B testing, the conclusion in bug 771745
was that we would just do preloading unconditionally.

Which means in practice, we don't need to have a function to enable it
manually anymore, since we're always enabling it.

--HG--
extra : rebase_source : c76307c13c057e87e1fe4564b82113fbfa20d382
2016-12-15 17:37:53 +09:00
Nicholas Nethercote 949658eb73 Bug 1329857 - Remove NS_METHOD and NS_CALLBACK. r=froydnj.
Bug 1295053 removed most uses of NS_METHOD and NS_CALLBACK, but one use was
unintentionally left behind (in the XPIDL parser) and another has since crept
in (in MediaDrmCDMProxy.h).

So this patch removes NS_METHOD and NS_CALLBACK. NS_METHOD_(nsresult) and
NS_CALLBACK_(nsresult, T) can still be used for the same purpose, but those
alternatives are less likely to be used unintentionally.

--HG--
extra : rebase_source : a50fc7b2a64a36d1ca9beda81bc0edb8f2ec1934
2017-01-10 14:08:43 +11:00
Gerald Squelart 86723427e8 Bug 1329319 - gtest for issue with NewRunnableMethod on a non-refcounted base class method - r=froydnj
This test alone would fail to even build without the previous patch,
demonstrating the issue at hand, where the method-pointer from the base class
forces NewRunnableMethod to store a pointer to that base class in a RefPtr,
which is not possible when that base class is not ref-counted.

MozReview-Commit-ID: 9XaQ8SwMqVo

--HG--
extra : rebase_source : 3ba0e13fb76ef2c5969084334c2f11e3f445d11f
2017-01-09 11:09:59 +11:00
Gerald Squelart 1cc4e2c254 Bug 1329319 - Allow NewRunnableMethod to method of a non-refcounted base class - r=froydnj
This is done by storing the object pointer based on the exact pointee type,
instead of as hinted by the method-pointer, which could be a non-refcounted
base class.

The stored pointer type is statically-checked to be derived from (or the same
as) the class type from the method-pointer, to prevent misuses.

One change had to be done in TrackBuffersManager, as it was passing another
type and relying on implicit pointer conversions. A simple `.get()` to pass
the raw pointer type (to be stored in a RefPtr) fixed that one issue.

MozReview-Commit-ID: 4kH0XdjB5Rk

--HG--
extra : rebase_source : 40ad68820cfce469ecda272f430062f05dfcd09f
2017-01-10 10:49:08 +11:00