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

124 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Jon Coppeard f008add28c Bug 1342012 - Support import from timeout handlers by associating the initiating script with the compiled JSScript r=smaug 2018-12-06 16:52:18 -05:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrea Marchesini cfe495e70b Bug 1490165 - Workers.setTimeout/setInterval must handle CSP rejections, r=ckerschb 2018-09-17 17:53:10 +02:00
Andrea Marchesini ceea0172b0 Bug 1473587 - CSP Violation events should have the correct sample for inline contexts, r=jorendorff, r=ckerschb 2018-07-16 17:58:04 +02:00
Andrea Marchesini 5fff1762ad Bug 1418236 - Correct EventTarget for CSP violation events, r=ckerschb 2018-07-10 17:40:21 +02:00
Andrea Marchesini 14d462eeb3 Bug 1418246 - Return valid columnNumber value in CSP violation events, r=ckerschb 2018-07-05 08:21:04 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Andrea Marchesini 26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Jon Coppeard 2ab91577de Bug 1409466 - Fix assertion failures when CC logging is enabled r=mccr8 2017-11-07 12:57:31 +00:00
Jonathan Watt 60fa0649f2 Bug 1406819 - Remove various bits of dead code from dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D109
2017-10-11 10:09:13 +01:00
Andrew McCreight c77f1723be Bug 1381921, part 2 - Remove nsAXPCNativeCallContext. r=mrbkap
This class is no longer used.

MozReview-Commit-ID: Lv9AAd3OjIl

--HG--
extra : rebase_source : b37abc2c70a2a08b176d0504163c246b6ff3b8cf
2017-07-18 10:42:47 -07:00
Olli Pettay 0364dbc792 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Nathan Froyd 2ebbd09068 Bug 1320752 - remove mozilla/Function.h; r=gerald
We have std::function available now, which is likely to be somewhat more
efficient.
2016-11-28 11:03:53 -05:00
Andreas Farre d31692e9f6 Bug 1198381 - Extract nsITimeoutHandler from nsIScriptTimeoutHandler. r=smaug
MozReview-Commit-ID: HJHrbodWYVf

--HG--
extra : rebase_source : 33a6c40b1e1e3a05478e9260ccb70f5e7f2206b7
2016-10-05 14:26:08 +02:00
Andreas Farre 9444ceb267 Bug 1198381 - Move/rename nsTimeout to Timeout, r=smaug
MozReview-Commit-ID: 1WrH2ZbOuzj

--HG--
extra : rebase_source : 7883b35b116f2b2a616c8cb2c502f40993feabc4
2016-08-22 14:52:19 +02:00
Carsten "Tomcat" Book 217631aa6d Backed out changeset 228cc133fe6b (bug 1198381) for causing increased number of hangs in navigate() in marionette tests 2016-10-25 12:34:22 +02:00
Carsten "Tomcat" Book 2b410144bf Backed out changeset 24839edcf0ef (bug 1198381) 2016-10-25 12:33:00 +02:00
Andreas Farre 0981b9665a Bug 1198381 - Extract nsITimeoutHandler from nsIScriptTimeoutHandler. r=smaug
MozReview-Commit-ID: HJHrbodWYVf

--HG--
extra : rebase_source : e51785327f84f08829e1464f1789281fc92b95ad
2016-10-05 14:26:08 +02:00
Andreas Farre 979adce9e5 Bug 1198381 - Move/rename nsTimeout to Timeout, r=smaug
MozReview-Commit-ID: 1WrH2ZbOuzj

--HG--
extra : rebase_source : a010060badf2ffbfeadb1d7f8cc29376c214bcc6
2016-08-22 14:52:19 +02:00
Terrence Cole 0edc10380c Bug 1297558 - Use a read barrier on Heap to ExposeToActiveJS r=sfink r=mccr8 2016-02-07 09:08:55 -08:00
Andrea Marchesini 1738225353 Bug 1297472 - Improve nsIScriptTimeoutHandler::GetHandlerText(), r=bz 2016-09-05 21:25:13 +02:00
Nathan Froyd 0c0f1a9ecf Bug 1298068 - part 2 - use nsTArray<>&& arguments when constructing nsJSScriptTimeoutHandler objects; r=baku
This way of writing things is more clear than what the current code does.
2016-08-30 18:54:12 -04:00
Nathan Froyd 620d7242e3 Bug 1298068 - part 1 - use nsTArray instead of FallibleTArray in nsJSScriptTimeoutHandler; r=baku
One small contribution to getting rid of FallibleTArray entirely.
2016-08-30 18:54:13 -04:00
Andrea Marchesini 01bf6ba4a1 Bug 1288770 - Switch worker timeouts to using nsJSTimeoutHandler, r=smaug 2016-08-16 08:10:30 +02:00
Sebastian Hengst 167156e726 Backed out changeset 2d5975fd02bd (bug 1288770) for asserting in ErrorResult.h when test test_errorPropagation.html runs. r=backout 2016-08-16 17:11:22 +02:00
Andrea Marchesini 780f93ea66 Bug 1288770 - Switch worker timeouts to using nsJSTimeoutHandler, r=smaug 2016-08-16 08:10:30 +02:00
Andrew McCreight b80e656e9e Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
Boris Zbarsky a67ee2ad2f Bug 1230698. Make NS_CreateJSTimeoutHandler with a string propagate out exceptions from the nsJSScriptTimeoutHandler constructor if they happen. r=peterv 2015-12-10 16:14:10 -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
Nicholas Nethercote c52a8f22b4 Bug 1200484 (part 12) - Use JS column numbers in nsJSTimeoutHandler. r=peterv.
--HG--
extra : rebase_source : 9c08cae753b7162cc77c1ac2df4fbc17fac4ad83
2015-09-03 16:03:19 -07:00
Nicholas Nethercote 9d90c4df35 Bug 1200484 (part 11) - Set source location when initializing an nsJSScriptTimeoutHandler from a Function. r=peterv.
Because we currently set the source location of a nsJSScriptTimeoutHandler when
initializing from an expression, but not when initializing from a function,
which is an undesirable inconsistency. This requires plumbing through the
JSContext in a few places.

--HG--
extra : rebase_source : 247b510d99164c3139d381c4f13aa6c493a52043
2015-09-03 16:03:19 -07:00
Boris Zbarsky 506ddeedf8 Bug 1176083. Remove the now-dead code for the XPCOM version of setTimeout/setInterval. r=smaug
I claim this code is dead because on the one hand it's no longer called from JS
(because Window is always on WebIDL bindings, but on the other hand it can't
really be called from C++ because it depends on examining the XPConnect call
information.

I think removing this completely, including from the IDL, is safe, because
nothing directly returns nsIDOMJSWindow, so anyone using its vtable would have
to QI to it and we're changing the IID.
2015-06-24 00:42:46 -07:00
Birunthan Mohanathas 180b572edb Bug 968520 - Add mozilla::fallible to FallibleTArray::AppendElement calls. r=froydnj 2015-05-28 11:07:44 -07:00
Birunthan Mohanathas 470bd9148f Bug 968520 - Add mozilla::fallible to FallibleTArray::AppendElements calls. r=froydnj 2015-05-28 11:07:43 -07:00
Birunthan Mohanathas 1f8d7454e3 Bug 968520 - Add mozilla::fallible to Fallible{Auto,}TArray::SetCapacity calls. r=froydnj 2015-05-18 13:50:34 -07:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Boris Zbarsky 1540774b0c Bug 1157898 part 1. Make code of the form "return rv.ErrorCode();" where rv is an ErrorResult use StealNSResult instead. r=peterv
This patch was generated with the following command:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 's/return ([a-zA-Z0-9]+)\.ErrorCode\(\);/return \1.StealNSResult();/'
2015-04-27 09:18:51 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -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 MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Bobby Holley 48db7f65fd Bug 1117851 - Make GetCallingLocation take an nsA{,C}String. r=smaug 2015-01-06 15:50:29 -05:00
Ryan VanderMeulen dadc725623 Backed out changeset 9035e4de3c03 (bug 1117851) for suspicion of causing Linux32 dromaeo DOM regressions (bug 1118257). 2015-01-06 15:24:45 -05:00
Ehsan Akhgari 961f45f728 Bug 1117264 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/base code; r=baku 2015-01-06 11:52:45 -05:00
Ehsan Akhgari 6b8a74ae55 Backed out changeset bc7e683ef708 (bug 1117264) for build bustage on a CLOSED TREE 2015-01-05 21:55:18 -05:00
Ehsan Akhgari 97155a7290 Bug 1117264 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/base code; r=baku 2015-01-05 20:54:28 -05:00
Bobby Holley a5bfe5cf02 Bug 1117851 - Make GetCallingLocation take an nsA{,C}String. r=smaug 2015-01-05 13:53:27 -08:00
Jan de Mooij 2a7ce8f885 Bug 1034689 part 2 - Add AssignJSFlatString and use it. r=bz,terrence 2014-07-12 09:43:06 +02:00
Benoit Jacob ec742680c8 Bug 1028588 - Fix dangerous public destructors in the rest of dom/ - r=ehsan 2014-06-23 15:56:07 -04:00
Ehsan Akhgari 6011b07362 Bug 1015430 - Fix more XPCOM constructors to clarify whether they should be explicit; r=froydnj 2014-05-25 21:16:01 -04:00