Commit Graph

1834 Commits

Author SHA1 Message Date
Ryan VanderMeulen
012ebe255c Merge the last PGO-green inbound changeset to m-c. 2012-08-30 21:54:09 -04:00
Kyle Huey
22ec03d0cd Bug 786048: Rename 'JSEventListener' to 'EventHandler' to better match the spec's terminology. r=smaug 2012-08-30 09:25:10 -07:00
Neil Deakin
d4bcba8eda Bug 784142, assertion and crash calling alert while closing a window, r=smaug 2012-08-30 15:39:39 -04:00
Andrew McCreight
25c2f79acd Bug 749366 - Remove mostly bogus size arg from CC callbacks. r=smaug 2012-08-27 10:41:04 -07:00
Philipp von Weitershausen
0829e9bcf4 Bug 776825 - Separate message managers into senders and broadcasters. r=smaug 2012-08-27 11:13:02 -03:00
Ryan VanderMeulen
4269daed50 Merge m-c to inbound. 2012-08-24 16:18:09 -04:00
Olli Pettay
93ee3b2c3a Bug 785228 - nsGlobalWindow is described twice during traverse, r=mccr8 2012-08-23 14:15:39 -07:00
Rafael Ávila de Espíndola
460774e8bc Bug 784889 - Use nullptr in a function that returns a pointer. r=ms2ger. 2012-08-23 09:56:10 -04:00
Andrew McCreight
95c2a39fbf Bug 750570, part 4 - Switch most native CC classes to use the purple buffer. r=smaug
This patch actually converts over most of the existing native CC classes
to use the participant. This is done by converting them to use
the newly generalized nsCycleCollectingAutoRefCnt instead of their usual
ref count.

This is mostly a matter of defining new macros defining AddRef() and Release()
for native CC classes with the CC ref count.

nsTimeout is left as a legacy native CC class because it is a weird class,
but hopefully eventually it too can be converted over.  See bug 774874.
2012-08-24 09:50:06 -07:00
Matt Brubeck
2ee6f37afd Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and...
036eb8c2a08a d4d36e3b948f 35334e820632 6bd07fd5147d d49e7c0d762c 407f19deb14c d84551808abb (bug 774633)
on a CLOSED TREE
2012-08-23 21:34:27 -07:00
Luke Wagner
55107a5229 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley) 2012-08-21 18:42:53 -07:00
Bobby Holley
7a71adfb34 Bug 771354 - Don't special-case principal assignment for chrome windows in nsGlobalWindow.cpp. r=bz 2012-08-23 16:44:53 -07:00
Bobby Holley
03e0709785 Bug 774607 - Remove use of JS_{Is,Make}SystemObject from Gecko. r=bz
We currently set this for system globals and anything whose parent
chain leads to a system global. Maybe this was relevant before, but
with CPG this is just equivalent to asking whether the object is in
a system compartment. And the only place where we _check_ this bit
is immediately after checking for a system compartment, in
WrapperFactory. So AFAICT this can go away entirely.
2012-08-23 16:44:53 -07:00
Bobby Holley
77a3dd565c Bug 774633 - Assert against switching origins on a compartment. r=jst 2012-08-23 16:44:53 -07:00
Bobby Holley
24f87a6519 Bug 774633 - Remove "is chrome window" condition for inner window reuse. r=jst
WouldReuseInnerWindow also returns true if the new window is same-origin with
the old one about:blank document.

This condition exists in order to handle some sloppiness with respect to the
principals on initial about:blank documents. Chrome callers sometimes parent
chrome windows (with XUL document) to content windows. But this parenting causes
us to push the cx of the content window during window creation, meaning that
the subsequent load of chrome://foo.xul blows away the old inner window and any
expandos on it. We can handle this case more precisely by skipping the cx push
for type="chrome" windows.

Furthermore, this was also necessary to prevent the inner window from being
blown away in the call to SetOpenerScriptPrincipal once nsWindowWatcher gets
the window back from the window creator (and after it's already told consumers
about the window via "domwindowcreated"). But we fixed this nastiness in the
previous patches.

So we can remove this case. By doing so, we can prevent inner windows from ever
changing origins, which is very important for compartment security invariants.
2012-08-23 16:44:53 -07:00
Bobby Holley
34978c8518 Bug 774633 - Fold SetOpenerScriptPrincipal into SetInitialPrincipalToSubject, and make it indempotent and callable without an existing document. r=jst
There's no reason it has to fail if there's no mDoc, since any document is promptly
blown away with the new about:blank document.

The indempotence is important because we want to be able to call this method
unconditionally in OpenJSWindowInternal (since we may not have gone through
RegisterTopLevelWindow) without worrying about whether we've called it already.
2012-08-23 16:44:52 -07:00
Bobby Holley
16ca2e4d85 Bug 774633 - Remove dead mOpenerScriptPrincipal. r=jst
This value is initialized to null and never set, so we can get rid of it.
2012-08-23 16:44:52 -07:00
Bobby Holley
76f3e79815 Bug 774633 - Wean SetInitialPrincipalToSubject off some parameters and clean it up. r=jst
We can remove the fallback to the principal of aParent because we already push the
cx for aParent (callerContextGuard) whenever we're concerned about using its principal.
2012-08-23 16:44:52 -07:00
Bobby Holley
05a2b78ccf Bug 774633 - Factor nsWindowWatcher call to SetOpenerScriptPrincipal into a method on nsGlobalWindow. r=jst
This doesn't change any functionality in the code. Note that the name is currently
a bit of a misnomer, but we change that in the next patch when we rip out the
arguments.
2012-08-23 16:44:52 -07:00
Justin Lebar
9c41555840 Bug 784436 - Part 2: Use new infallible nsIDocShell methods. r=bz 2012-08-22 18:27:04 -07:00
Ehsan Akhgari
243c878d26 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Ian Melven
8d84916d6c Bug 341604 - iframe sandbox - block indexedDB if sandboxed without allow-same-origin, add tests for indexedDB r=jst 2012-08-20 11:34:34 -07:00
Ian Melven
1e1aba63ce Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs r=smaug r=jst 2012-08-20 11:34:32 -07:00
Bill McCloskey
acab71cd78 Bug 783416 - Stop saving the prototype in WindowStateHolder (r=mrbkap) 2012-08-17 10:09:01 -07:00
Neil Deakin
13597b29c2 Bug 743975 - use a widget listener interface instead of the remaining events that don't need an event, r=tn,jmathies,netzen,smichaud,karlt,blassey,chrisjones 2012-08-15 14:52:42 -04:00
Ehsan Akhgari
c0f8e7985f Merge removal of nsnull 2012-08-14 11:29:00 -04:00
Ehsan Akhgari
99eb3e7136 Bug 626472 - Remove on last nsnull! 2012-08-14 11:28:45 -04:00
Justin Lebar
3fdb7665ae Bug 769254 - Part 2: Modify nsPIWindowWatcher::OpenWindowJS (renamed to OpenWindow2) so we can pass in the URL for target=_blank links without navigating the opened window to that URL. r=bz 2012-08-14 10:58:00 -04:00
Aryeh Gregor
0cc22f7712 Bug 626472 part 3 - Remove nsnull for good; r=ehsan 2012-08-12 13:43:47 +03:00
Neil Deakin
ea846a8e61 Bug 391834, don't allow prompts in beforeunload, unload and pagehide events,r=smaug,patch mostly by gavin 2012-08-13 15:05:34 -04:00
Neil Deakin
d0b48a4eb2 Bug 391834, rearrange some popup dialog code to be simpler,r=smaug,patch mostly by gavin 2012-08-13 15:03:59 -04:00
Justin Lebar
679b937006 Bug 777135 - Part 3: Remove nsDOMWindowUtils::GetIsApp and friends. r=mounir 2012-08-13 12:58:38 -04:00
Justin Lebar
b9074c918e Bug 777135 - Part 2: Stop using nsDOMWindowUtils::GetIsApp and friends, and instead use the relevant methods on the principal. r=mounir 2012-08-13 12:58:38 -04:00
Robert O'Callahan
5298635880 Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron 2012-08-10 23:17:06 +12:00
Ms2ger
1949badad3 Backout changeset c77acb256aec for failing to work. 2012-08-11 18:12:54 +02:00
Phil Ringnalda
0c2159edb1 Backout dcb9d2f694eb (bug 769254) for Windows test_resize_move_windows.html M3 failures 2012-08-10 18:51:29 -07:00
Justin Lebar
09bc0af1c7 Bug 769254 - Part 2: Modify nsPIWindowWatcher::OpenWindowJS (renamed to OpenWindow2) so we can pass in the URL for target=_blank links without navigating the opened window to that URL. r=bz 2012-08-10 11:42:28 -04:00
Ed Morley
4b977f82e7 Backout 5d77941eba28 (bug 772726), df597d36bcbb (bug 383026), c9c7e1b9aed9 (bug 779399) for failures in meter-native-style.html 2012-08-10 14:50:43 +01:00
Robert O'Callahan
87b54b8073 Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron 2012-08-10 23:17:06 +12:00
Aryeh Gregor
691ef24b2a Bug 780618 - Move all error codes to nsError.h; r=ehsan 2012-07-27 17:03:27 +03:00
Ed Morley
a3e28ada9f Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-08-09 12:46:05 +01:00
Ms2ger
9724f51d83 Bug 780146 - Part a: Move window._content into IDL; r=jst 2012-08-09 09:16:09 +02:00
Boris Zbarsky
3d3f058246 Bug 703855. Don't update performance timing or navigation timing state during document.open. r=jst 2012-08-08 23:47:04 -04:00
Chris Jones
41f367b6fd Revert e3e9040a6eb9 for M2 failures 2012-08-08 21:58:23 -07:00
Boris Zbarsky
3beaa1f31b Bug 703855. Don't update performance timing or navigation timing state during document.open. r=jst 2012-08-08 23:47:04 -04:00
Ms2ger
1e4b5dd049 Bug 780165 - Part a: Introduce nsPIDOMWindow::GetDoc(); r=smaug 2012-08-04 09:44:01 +02:00
Ed Morley
a246794e16 Revert inbound to 3d5d1daa2505 to stop OS X M5 failures (backout not clean/could have been a bad merge) on a CLOSED TREE 2012-08-04 18:05:15 +01:00
Ms2ger
51dfd21450 Bug 780165 - Part a: Introduce nsPIDOMWindow::GetDoc(); r=smaug 2012-08-04 09:44:01 +02:00
Ed Morley
e2ea52217d Merge mozilla-central and fx-team 2012-08-03 15:52:55 +01:00
Tim Taubert
1622cd5c11 Bug 728294 - Part 2 - Add last opened URI and windowID to a refCounted node's description in debug mode; r=smaug 2012-08-03 12:36:59 +02:00