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

134 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 3b0485fcdb Bug 1294645 - Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl. r=froydnj.
Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.

This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.

--HG--
extra : rebase_source : c15d85298e0975fd030cd8f8f8e54501f453959b
2016-08-12 17:36:22 +10: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
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Nathan Froyd ddf68de505 Bug 1229962 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in parser/html/; r=hsivonen 2015-11-19 20:19:57 -05:00
Nathan Froyd 01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Henri Sivonen a00a469bb6 Bug 1176698 - Use fallible allocator for attribute values in the HTML parser. r=wchen. 2015-08-25 18:05:46 +03:00
Henri Sivonen e743fa6a9c Bug 1176681 - Make character buffer allocations in the HTML5 tree builder fallible. r=wchen. 2015-08-25 18:05:46 +03:00
Henri Sivonen 02d517f7ac Bug 489820 part 2 - Grow buffers to the worst-case size before tokenizing; fix comments. r=wchen. 2015-08-25 18:05:45 +03:00
Juan Gomez 258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Ryan VanderMeulen 5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez 702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Boris Zbarsky 9171dbee48 Bug 1151048. Disable speculative tokenization in the parser if it's failing too much. r=hsivonen 2015-04-13 19:36:33 -04:00
Mike Hommey c39e359c7d Bug 1138293 - Use malloc/free/realloc/calloc instead of moz_malloc/moz_free/moz_realloc/moz_calloc. r=njn
The distinction between moz_malloc/moz_free and malloc/free is not
interesting. We are inconsistent in our use of one or the other, and
I wouldn't be surprised if we are mixing them anyways.
2015-03-31 12:32:49 +09:00
Mike Hommey a35dbaeebf Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Henri Sivonen 723b4d1376 Bug 1088635. r=smaug. 2014-11-05 17:44:37 +02:00
Jason Duell 2c02c70fb0 Bug 1055728 - Only issue "can't retarget to off-main thread" warning on parent. r=hsivonen 2014-11-03 09:49:05 -08:00
Wes Kocher bbc7bde69b Backed out changeset dd73fa918f95 (bug 1055728) for linux build failures 2014-10-31 22:28:29 -07:00
Jason Duell b0ef2aaed6 Bug 1055728 - Only issue "can't retarget to off-main thread" warning on parent. r=hsivonen 2014-10-31 17:50:04 -07:00
Andrea Marchesini 8f8ec51372 Bug 1047483 - patch 3 - Renaming DOMFile to File, r=ehsan
--HG--
rename : content/base/public/nsDOMFile.h => content/base/public/File.h
rename : content/base/src/nsDOMFile.cpp => content/base/src/File.cpp
2014-10-08 17:15:23 +01:00
Ryan VanderMeulen cd3e8a6f73 Backed out 7 changesets (bug 1047483, bug 1079301, bug 1079335) for webplatform test failures.
Backed out changeset 7d06b68c44d0 (bug 1079335)
Backed out changeset 92030169528e (bug 1079301)
Backed out changeset c09d7f95554a (bug 1047483)
Backed out changeset c199f1057d7e (bug 1047483)
Backed out changeset 18830d07884c (bug 1047483)
Backed out changeset e087289ccfbb (bug 1047483)
Backed out changeset 6238ff5d3ed0 (bug 1047483)

CLOSED TREE

--HG--
rename : content/base/public/File.h => content/base/public/nsDOMFile.h
rename : content/base/src/MultipartFileImpl.cpp => content/base/src/nsDOMBlobBuilder.cpp
rename : content/base/src/MultipartFileImpl.h => content/base/src/nsDOMBlobBuilder.h
rename : content/base/src/File.cpp => content/base/src/nsDOMFile.cpp
2014-10-07 13:16:11 -04:00
Andrea Marchesini c8190ba625 Bug 1047483 - patch 3 - Renaming DOMFile to File, r=ehsan
--HG--
rename : content/base/public/nsDOMFile.h => content/base/public/File.h
rename : content/base/src/nsDOMFile.cpp => content/base/src/File.cpp
2014-10-07 15:20:55 +01:00
Ehsan Akhgari a2c5c75f32 Bug 1061060 - Fix more bad implicit constructors in parser; r=hsivonen
--HG--
extra : rebase_source : 4debaf0e0d52705472455d154298b3800d9d0db0
2014-09-01 18:04:52 -04:00
Phil Ringnalda 117bb1a341 Backed out 6 changesets (bug 1060982, bug 1061058, bug 1060987, bug 1061060, bug 1060930) for build bustage
CLOSED TREE

Backed out changeset c23b8418e6be (bug 1060987)
Backed out changeset a8cddc6bdffc (bug 1061060)
Backed out changeset b5af5cbdac3f (bug 1060982)
Backed out changeset 4912d451011a (bug 1060930)
Backed out changeset bdacbf453238 (bug 1061058)
Backed out changeset da6c71a8f5ae (bug 1060987)
2014-09-01 16:48:51 -07:00
Ehsan Akhgari 680162a741 Bug 1061060 - Fix more bad implicit constructors in parser; r=hsivonen 2014-09-01 18:04:52 -04:00
Kyle Huey 4de1923bc6 Bug 1024388: Attempt to retarget OnDataAvailable to the HTML parser thread for all channels, not just HTTP channels. r=bz 2014-06-17 09:39:19 -07:00
Birunthan Mohanathas f65339b9ff Bug 869836 - Part 5: Use AssignLiteral instead of Assign where possible. r=ehsan 2014-05-22 06:48:51 +03:00
Henri Sivonen 34b67bca76 Bug 943268 - Remove nsCharsetAlias and nsCharsetConverterManager. r=emk. 2014-05-08 12:32:00 +03:00
Birunthan Mohanathas 5f1fde8824 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
Henri Sivonen 8751f19db8 Bug 960519 - Make it safe to refcount the HTML parser's nsIStreamListener off-the-main-thread. r=smaug. 2014-04-16 08:41:39 +03:00
Ehsan Akhgari 1b83407ce9 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
Henri Sivonen 9cc02fab98 Bug 213517 part 1 - Interpret x-user-defined as windows-1252 in <meta> for compatibility with other browsers. r=smontagu.
--HG--
rename : parser/htmlparser/tests/mochitest/file_bug672453_meta_utf16.html => parser/htmlparser/tests/mochitest/file_bug672453_meta_userdefined.html
2014-01-02 09:18:19 +02:00
Henri Sivonen 7b95f9e668 Bug 919935 - Add a deCOMtaminated way to instantiate nsIUnicodeDecoders and nsIUnicodeEncoders. r=emk. 2013-11-26 09:31:52 +02:00
Henri Sivonen 2dc38251fe Bug 863728 - Implement the replacement encoding. r=emk. 2013-11-25 10:06:56 +02:00
Henri Sivonen 577d972a8a Bug 936440 - Report UTF-16LE or UTF-16BE instead of UTF-16 as the BOM-sniffed encoding. r=emk. 2013-11-12 10:45:22 +02:00
Henri Sivonen 5ac2a5be04 Bug 910192 non-UI part - Get rid of intl.charset.default as a localizable pref and deduce the fallback from the locale. r=bzbarsky. 2013-11-04 13:24:33 +02:00
Carsten "Tomcat" Book 6646962e49 Backed out changeset 88e0c01e2d81 (bug 910192) bustage on a CLOSED TREE 2013-11-04 13:04:02 +01:00
Henri Sivonen 7af818f242 Bug 910192 non-UI part - Get rid of intl.charset.default as a localizable pref and deduce the fallback from the locale. r=bzbarsky. 2013-11-04 13:24:33 +02:00
Steve Workman b4eafc86d7 Bug 920725 - Return with error in nsHtml5StreamParser::WriteStreamBytes if mLastBuffer is null. r=hsivonen 2013-10-16 11:16:36 -04:00
James Kitchener f29c71d5ef Bug 912981 - Make parser aware of view-source srcdoc status. r=hsivonen 2013-09-10 13:40:50 -04:00
Robert O'Callahan 03e7828db2 Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
--HG--
extra : rebase_source : 0787130b1814c74bfb38dc178de94022f0b2e64e
2013-09-02 20:41:57 +12:00
Ehsan Akhgari f9b077c0c8 Bug 904695 - #include fewer headers in nsContentUtils.h; r=jst 2013-08-21 15:28:26 -04:00
Mike Hommey 2e729aa83d Bug 881323 - Re-implement CycleCollectorParticipant with actual vtables, with constexpr to avoid static initializers. r=mccr8 2013-08-02 10:29:05 +09:00
Steve Workman 881c09835a Bug 497003 - Support delivery of OnDataAvailable on the HTML5 parser thread r=hsivonen r=bholley r=bz 2013-07-08 18:45:26 -07:00
James Kitchener a1621fa975 Bug 802895 - Parser changes to support srcdoc attributes for iframes, r=hsivonen 2013-06-28 23:13:23 -04:00
Ryan VanderMeulen adb213ed89 Backed out 4 changesets (bug 497003) for intermittent OSX crashes.
Backed out changeset 43223a927976 (bug 497003)
Backed out changeset 26c1d80edf1f (bug 497003)
Backed out changeset 841ed173ba2b (bug 497003)
Backed out changeset f70770fc6dce (bug 497003)
2013-06-17 15:44:07 -04:00
Steve Workman 895826d5ed Bug 497003 - Support delivery of OnDataAvailable on the HTML5 parser thread r=hsivonen r=bholley r=bz 2013-06-13 10:42:48 -07:00
Henri Sivonen 7f2f8a25e2 Bug 234628 part 1 - Make the BOM take precedence over manual encoding overrides. r=smaug. 2013-01-18 16:27:03 +02:00
Trevor Saunders 83bcbe0d6b bug 822289 - remove NS_IMPL_CYCLE_COLLECTION_CLASS and friends r=mccr8 2013-01-12 07:40:33 -05:00
Jeff Walden 120886ca73 Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger 2012-12-14 18:58:45 -05:00
Masatoshi Kimura ca51d6a175 Bug 638379 - Part 3: Remove workaround for unreliable inputErrorBehavior. r=hsivonen 2012-12-10 09:11:15 -05:00