Commit Graph

124 Commits

Author SHA1 Message Date
Eden Chuang
4427a101b6 Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug
1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process

Differential Revision: https://phabricator.services.mozilla.com/D23330
2019-03-26 15:18:20 +00:00
Emilio Cobos Álvarez
dc336a73ba 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
Peter Van der Beken
a4c053befe Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12656
2019-01-02 13:29:18 +00:00
Peter Van der Beken
37d70ee5f2 Bug 1353867 - Split up PostMessage into two parts, one gathering information from the source and one gathering information from the target. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12652
2019-01-02 13:27:33 +00:00
Peter Van der Beken
955ad9221e Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky
Make the WindowProxyHolder hold a strong reference to a BrowsingContext, as in the future
we might not have a nsPIDOMWindowOuter (if the document is loaded in a different process).

Differential Revision: https://phabricator.services.mozilla.com/D12651
2019-01-02 13:27:05 +00:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Andrea Marchesini
a2d9c9bb38 Bug 1502801 - window.postMessage must throw a trusted MessageEvent, r=asuth 2018-10-29 16:26:30 +01:00
Jan de Mooij
48d34e468e Bug 1479363 part 1 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/base. r=bz 2018-08-02 08:48:40 +02:00
Jan de Mooij
fddc23c346 Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Emilio Cobos Álvarez
0348c342b8 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Jan de Mooij
e5f8a28c84 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Ben Kelly
70b306a182 Bug 1450266 P1 Remove nsGlobalWindowInner::CleanUp() method in favor of FreeInnerObjects(). r=smaug 2018-04-03 17:10:16 -07:00
Hiroyuki Ikezoe
b1da8534e8 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr
2018-02-21 07:00:10 +09:00
Nika Layzell
20ee9a4927 Bug 1419597 - Part 18: Remove IsInnerWindow and IsOuterWindow methods, r=smaug
MozReview-Commit-ID: DAAm6tLubhJ
2017-11-23 13:12:13 -05:00
Nika Layzell
d8c117bc28 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
Andrea Marchesini
fbf508891d Bug 1359017 - onmessageerror for WindowEventHandlers in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-13 05:59:06 +02:00
Sebastian Hengst
dd8f6b6002 Backed out changeset 7b45c1aebf7f (bug 1359017) 2017-09-13 08:56:13 +02:00
Andrea Marchesini
840e3cd91a Bug 1359017 - onmessageerror for WindowEventHandlers in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-13 05:59:06 +02:00
Sebastian Hengst
78dfc00999 Backed out changeset e28d6869f6a0 (bug 1359017) 2017-09-12 14:16:31 +02:00
Andrea Marchesini
e3b564f46a Bug 1359017 - onmessageerror for WindowEventHandlers in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-12 11:57:26 +02:00
Thomas Nguyen
a9173e48d0 Bug 1373735 - Skip checking mPrivateBrowsingId in case system principal r=baku
MozReview-Commit-ID: 2sDJIxALC9L
2017-07-18 14:58:19 +08:00
Bill McCloskey
ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book
238bf154d5 Backed out changeset 4f6302a98ae4 (bug 1372405) 2017-06-21 13:59:26 +02:00
Bill McCloskey
67e8af4720 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
bbe9441993 Backed out changeset 9846de3bd954 (bug 1372405) 2017-06-20 08:27:02 +02:00
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
Andrea Marchesini
8c73b77b81 Bug 1345961 - Fixing an assertion about OriginAttribute comparison in PostMessage, r=tjr
The OriginAttributes of the 2 windows must match but ignoring the
FirstPartDomain isolation.
2017-05-04 15:42:42 +02:00
Ben Kelly
04d940c9ad Bug 1311324 P1 Update the MessageEvent webidl and implementation class. r=bz 2017-03-09 20:50:13 -05:00
Kris Maglione
418e10ee90 Bug 1314361 - Part 4: Stop setting addonId origin attribute. r=billm 2016-11-04 18:22:45 -07:00
Yoshi Huang
13130453ba Bug 1324115 - Part 2: replace the callers to use C++ helper. r=smaug 2016-12-21 14:59:21 +08:00
Andrew McCreight
209d4ee048 Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd
f2d50c26f4 Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight
2f93d6e48d Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Kris Maglione
98d56ebab2 Bug 1308920: Part 2 - Support posting messages across windows with different addonId origins. r=billm
MozReview-Commit-ID: 89TD8x5cUlZ
2016-11-01 19:04:13 -07:00
Andrea Marchesini
1f0f0c675e Bug 1313004 - ServiceWorkerMessageEvent can be generated code, r=qdot 2016-10-26 22:00:17 +02:00
Andrea Marchesini
5816360242 Bug 1310967 - Update MessageEvent to the latest spec, r=smaug 2016-10-25 07:48:05 +02:00
Sebastian Hengst
6f01376048 Backed out changeset 1fc115bbc7be (bug 1310967) for failing test_messageEvent_init.html. r=backout 2016-10-24 19:14:38 +02:00
Andrea Marchesini
4e495f34fc Bug 1310967 - Update MessageEvent to the latest spec, r=smaug 2016-10-24 17:10:46 +02:00
Andrea Marchesini
ae47ca23c2 Bug 1308956 - Get rid of MessagePortList - part 1 - MessagePortList removed from events, r=smaug 2016-10-13 15:19:24 +02:00
Andrea Marchesini
c8a40161f0 Bug 1264053 - MessagePort should support transferable objects in multi-e10s, r=sfink, r=smaug, r=jorendorff, r=janv 2016-07-21 15:29:42 +02:00
Boris Zbarsky
4b0ccbe2cf Bug 1291437 followup. Add some comments explaining why we're initializing the AutoJSAPI in PostMessageEvent::Run the way we do. DONTBUILD 2016-08-02 13:28:17 -07:00
Boris Zbarsky
03a4035c88 Bug 1291437. Don't enter the compartment of a possibly-gray window object in PostMessageEvent::Run. r=smaug 2016-08-02 13:21:16 -07:00
Andrea Marchesini
b734d694c0 Bug 1263405 - Some headers missing in dom/base, r=smaug 2016-04-11 12:02:35 -04:00
Aidin Gharibnavaz
9e61252906 Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent r=smaug
MozReview-Commit-ID: Hm8Owq17KXn
2016-02-12 19:10:07 +03:30
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
James Burke
ad93a1daf6 Bug 1139849 - postMessage to incorrect target domain should print a console security error r=bz 2016-01-29 13:32:01 -08: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
Andrea Marchesini
d3afd48953 Bug 1209919 - Improving naming and comments in StructuredCloneHelper, r=smaug 2015-09-30 13:22:08 +01:00
Kit Cambridge
cfcdba2314 Bug 1209361 - Add missing includes to dom/base. r=mccr8 2015-09-28 21:31:56 -07:00
Andrea Marchesini
8ffb255cfa Bug 1204775 - SharedWorker.port should be a 'real' MessagePort, r=khuey 2015-09-16 11:27:56 +08:00