Commit Graph

1786 Commits

Author SHA1 Message Date
Eric Rahm
83ec610692 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 22:17:19 -07:00
Wes Kocher
fcc808d96c Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
579c7d8013 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00
Eric Rahm
a50b98baa8 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 14:31:00 -07:00
Eric Rahm
bac140c6c1 Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj 2015-05-21 13:22:04 -07:00
Eric Rahm
32b4ff6b18 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Terrence Cole
0aefa6e182 Bug 1164602 - Replace js::NullPtr and JS::NullPtr with nullptr_t; r=sfink 2015-05-13 14:07:34 -07:00
Eric Rahm
0c5f2525a6 Bug 1163201 - Part 1: Remove instances of #ifdef PR_LOGGING in dom/. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
2015-05-14 10:13:23 -07:00
Ms2ger
4e05909144 Bug 1017758 - Use infallible getters for appId/isInBrowserElement/unknownAppId; r=bz 2015-05-13 17:59:08 +02:00
Andrea Marchesini
615fe38d14 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan 2015-05-12 13:11:03 +01:00
Andrea Marchesini
08c931dc57 Bug 1159401 - Split Blob and File classes, r=bz 2015-05-12 13:09:51 +01:00
Wes Kocher
477215237f Backed out 2 changesets (bug 1159401) for b2g build bustage
Backed out changeset adfee1efb1e1 (bug 1159401)
Backed out changeset 70c63c8546e3 (bug 1159401)
2015-05-11 14:54:02 -07:00
Wes Kocher
ad02ab5ada Backed out changeset 56e4c68dc3da (bug 1163387) for build bustage CLOSED TREE 2015-05-11 13:17:58 -07:00
Andrea Marchesini
4aa3305857 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan 2015-05-11 18:50:54 +01:00
Andrea Marchesini
7e0e157266 Bug 1159401 - patch 1 - Split Blob and File in 2 classes, r=bz 2015-05-11 18:50:50 +01:00
Ryan VanderMeulen
64bb0dd547 Backout revisions 4287533203fb and 96a3ebfe09d8 (bug 1159401) for bustage.
CLOSED TREE
2015-05-11 11:43:59 -04:00
Andrea Marchesini
246389cea0 Bug 1159401 - patch 1 - Split Blob and File in 2 classes, r=bz 2015-05-11 15:20:06 +01:00
Boris Zbarsky
b25bc69525 Bug 1162013. Process the Promise queue between adjacent setTimeout callback invocations when we're going through the callback list without returning to the event loop. r=smaug 2015-05-07 14:49:31 -04:00
Wes Kocher
8e8734c870 Backed out changeset 57f0b16030e9 (bug 1162013) for m-oth and m-dt3 bustage CLOSED TREE 2015-05-07 13:37:27 -07:00
Boris Zbarsky
2432238dc9 Bug 1162013. Process the Promise queue between adjacent setTimeout callback invocations when we're going through the callback list without returning to the event loop. r=smaug 2015-05-07 14:49:31 -04:00
Andrea Marchesini
ab6fa89a07 Bug 1156875 - patch 1 - URL.createObjectURL leaks in JS sandbox, r=bholley 2015-05-07 08:05:43 +01:00
Xidorn Quan
5bb3b2459a Bug 947854 part 2 - Avoid exiting fullscreen mode when exit from DOM fullscreen. r=smaug,dao 2015-05-06 10:04:31 +12:00
Andrew McCreight
c979f253c0 Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Boris Zbarsky
c0c69958a2 Bug 1155946 part 2. Add mayResolve methods to DOM classes with resolve hooks. r=peterv 2015-04-28 12:25:55 -04:00
Nikhil Marathe
d71536c76f Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley 2015-04-27 12:00:41 -07:00
Ryan VanderMeulen
38187fb61b Backed out changeset c839f283bf28 (bug 1058695) for bustage.
CLOSED TREE
2015-04-27 14:04:24 -04:00
Nikhil Marathe
ecb979e722 Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley 2015-04-22 16:34:21 -07:00
Boris Zbarsky
77e529551e Bug 1155984. Improve the performance of the "self" getter in both window and workers. r=peterv,jorendorff 2015-04-27 13:38:12 -04:00
Boris Zbarsky
f751c0a094 Bug 1157898 part 5. Eliminate the remaining non-ErrorResult consumers of ErrorResult::ErrorCode and make it protected. r=peterv 2015-04-27 09:18:52 -04:00
Boris Zbarsky
6a3f2d3909 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
Kyle Machulis
b9e62b0591 Bug 852944 - Gamepad API IPC; r=ted, r=baku 2015-04-23 15:05:29 -07:00
Nikhil Marathe
ecd92e39ea Backed out changeset cb59db723d15 (Bug 1058695) for bustage on CLOSED TREE 2015-04-23 09:46:52 -07:00
Nikhil Marathe
29452a48c3 Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley 2015-04-22 16:34:21 -07:00
Nikhil Marathe
9eb26f39bb Backed out changeset 527cd70f241f (Bug 1058695) for bustage 2015-04-23 09:07:16 -07:00
Nikhil Marathe
654b7455dd Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley 2015-04-22 16:34:21 -07:00
Milan Sreckovic
4188db2cc6 Bug 404828 - No need to assert that the top window isn't reachable. r=smaug 2015-04-17 16:37:54 -04:00
Denis Volk
cd6346cce0 Bug 1095098 - move do_QueryObject templates into their own header; r=froydnj 2015-04-15 12:47:03 -04:00
Ehsan Akhgari
0c49417b2c Bug 1156102 - Mark nsGlobalWindowObserver::mWindow as MOZ_NON_OWNING_REF; r=baku 2015-04-20 08:35:39 -04:00
Ehsan Akhgari
4ff5cb04c3 Bug 1156101 - Mark nsGlobalWindow::mObserver as an nsRefPtr; r=baku 2015-04-20 08:35:38 -04:00
Ted Mielczarek
dbfb883711 bug 1155691 - Expose WindowRoot to chrome from window in webidl. r=smaug 2015-04-17 16:17:26 -04:00
Jim Blandy
3fe47490c7 Bug 1152577: Add 'aReason' argument to AutoEntryScript constructor, and provide plausible names for its instantiations. r=bholley 2015-04-08 21:23:48 -04:00
Paul Adenot
cdfde43ff6 Bug 1094764 - Implement AudioContext.suspend and friends. r=roc,ehsan
- Relevant spec text:
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-suspend-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-resume-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-close-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-onstatechange

- In a couple words, the behavior we want:
    - Closed context cannot have new nodes created, but can do decodeAudioData,
    and create buffers, and such.
    - OfflineAudioContexts don't support those methods, transitions happen at
    startRendering and at the end of processing. onstatechange is used to make
    this observable.
    - (regular) AudioContexts support those methods. The promises and
    onstatechange should be resolved/called when the operation has actually
    completed on the rendering thread.  Once a context has been closed, it
    cannot transition back to "running". An AudioContext switches to "running"
    when the audio callback start running, this allow authors to know how long
    the audio stack takes to start running.
    - MediaStreams that feed in/go out of a suspended graph should respectively
    not buffer at the graph input, and output silence
    - suspended context should not be doing much on the CPU, and we should try
    to pause audio streams if we can (this behaviour is the main reason we need
    this in the first place, for saving battery on mobile, and CPU on all
    platforms)

- Now, the implementation:
    - AudioNodeStreams are now tagged with a context id, to be able to operate
    on all the streams of a given AudioContext on the Graph thread without
    having to go and lock everytime to touch the AudioContext. This happens in
    the AudioNodeStream ctor. IDs are of course constant for the lifetime of the
    node.
    - When an AudioContext goes into suspended mode, streams for this
    AudioContext are moved out of the mStreams array to a second array,
    mSuspendedStreams. Streams in mSuspendedStream are not ordered, and are not
    processed.
    - The MSG will automatically switch to a SystemClockDriver when it finds
    that there are no more AudioNodeStream/Stream with an audio track. This is
    how pausing the audio subsystem and saving battery works. Subsequently, when
    the MSG finds that there are only streams in mSuspendedStreams, it will go
    to sleep (block on a monitor), so we save CPU, but it does not shut itself
    down. This is mostly not a new behaviour (this is what the MSG does since
    the refactoring), but is important to note.
    - Promises are gripped (addref-ed) on the main thread, and then shepherd
    down other threads and to the GraphDriver, if needed (sometimes we can
    resolve them right away). They move between threads as void* to prevent
    calling methods on them, as they are not thread safe. Then, the driver
    executes the operation, and when it's done (initializing and closing audio
    streams can take some time), we send the promise back to the main thread,
    and resolve it, casting back to Promise* after asserting we're back on the
    main thread. This way, we can send them back on the main thread once an
    operation has complete (suspending an audio stream, starting it again on
    resume(), etc.), without having to do bookkeeping between suspend calls and
    their result. Promises are not thread safe, so we can't move them around
    AddRef-ed.
    - The stream destruction logic now takes into account that a stream can be
    destroyed while not being in mStreams.
    - A graph can now switch GraphDriver twice or more per iteration, for
    example if an author goes suspend()/resume()/suspend() in the same script.
    - Some operation have to be done on suspended stream, so we now use double
    for-loop around mSuspendedStreams and mStreams in some places in
    MediaStreamGraph.cpp.
    - A tricky part was making sure everything worked at AudioContext
    boundaries.  TrackUnionStream that have one of their input stream suspended
    append null ticks instead.
    - The graph ordering algorithm had to be altered to not include suspended
    streams.
    - There are some edge cases (adding a stream on a suspended graph, calling
    suspend/resume when a graph has just been close()d).
2015-02-27 18:22:05 +01:00
Nathan Froyd
68d9d5628d Bug 1153267 - part 1 - use smart-pointer .forget() instead of NS_ADDREF+assign; r=ehsan 2015-03-31 10:03:49 -04:00
Carsten "Tomcat" Book
868ff5aa13 Backed out changeset 7fc52c48e6e3 (bug 1094764) for mulet m-3 perma failure in /test_dataChannel_basicAudioVideo.html 2015-04-09 13:44:27 +02:00
Paul Adenot
cd44763a23 Bug 1094764 - Implement AudioContext.suspend and friends. r=roc,ehsan
- Relevant spec text:
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-suspend-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-resume-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-close-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-onstatechange

- In a couple words, the behavior we want:
    - Closed context cannot have new nodes created, but can do decodeAudioData,
    and create buffers, and such.
    - OfflineAudioContexts don't support those methods, transitions happen at
    startRendering and at the end of processing. onstatechange is used to make
    this observable.
    - (regular) AudioContexts support those methods. The promises and
    onstatechange should be resolved/called when the operation has actually
    completed on the rendering thread.  Once a context has been closed, it
    cannot transition back to "running". An AudioContext switches to "running"
    when the audio callback start running, this allow authors to know how long
    the audio stack takes to start running.
    - MediaStreams that feed in/go out of a suspended graph should respectively
    not buffer at the graph input, and output silence
    - suspended context should not be doing much on the CPU, and we should try
    to pause audio streams if we can (this behaviour is the main reason we need
    this in the first place, for saving battery on mobile, and CPU on all
    platforms)

- Now, the implementation:
    - AudioNodeStreams are now tagged with a context id, to be able to operate
    on all the streams of a given AudioContext on the Graph thread without
    having to go and lock everytime to touch the AudioContext. This happens in
    the AudioNodeStream ctor. IDs are of course constant for the lifetime of the
    node.
    - When an AudioContext goes into suspended mode, streams for this
    AudioContext are moved out of the mStreams array to a second array,
    mSuspendedStreams. Streams in mSuspendedStream are not ordered, and are not
    processed.
    - The MSG will automatically switch to a SystemClockDriver when it finds
    that there are no more AudioNodeStream/Stream with an audio track. This is
    how pausing the audio subsystem and saving battery works. Subsequently, when
    the MSG finds that there are only streams in mSuspendedStreams, it will go
    to sleep (block on a monitor), so we save CPU, but it does not shut itself
    down. This is mostly not a new behaviour (this is what the MSG does since
    the refactoring), but is important to note.
    - Promises are gripped (addref-ed) on the main thread, and then shepherd
    down other threads and to the GraphDriver, if needed (sometimes we can
    resolve them right away). They move between threads as void* to prevent
    calling methods on them, as they are not thread safe. Then, the driver
    executes the operation, and when it's done (initializing and closing audio
    streams can take some time), we send the promise back to the main thread,
    and resolve it, casting back to Promise* after asserting we're back on the
    main thread. This way, we can send them back on the main thread once an
    operation has complete (suspending an audio stream, starting it again on
    resume(), etc.), without having to do bookkeeping between suspend calls and
    their result. Promises are not thread safe, so we can't move them around
    AddRef-ed.
    - The stream destruction logic now takes into account that a stream can be
    destroyed while not being in mStreams.
    - A graph can now switch GraphDriver twice or more per iteration, for
    example if an author goes suspend()/resume()/suspend() in the same script.
    - Some operation have to be done on suspended stream, so we now use double
    for-loop around mSuspendedStreams and mStreams in some places in
    MediaStreamGraph.cpp.
    - A tricky part was making sure everything worked at AudioContext
    boundaries.  TrackUnionStream that have one of their input stream suspended
    append null ticks instead.
    - The graph ordering algorithm had to be altered to not include suspended
    streams.
    - There are some edge cases (adding a stream on a suspended graph, calling
    suspend/resume when a graph has just been close()d).
2015-02-27 18:22:05 +01:00
Boris Zbarsky
b69560d8fb Bug 1151940 part 3. Make some writable cssom-view attributes that we only allow setting from chrome act the way readonly replaceables would when called from content. r=smaug 2015-04-08 22:50:45 -04:00
Boris Zbarsky
4b776e2bc5 Bug 1151940 part 2. Add a convenience function in nsGlobalWindow for replacing a property on the window with a new value. r=smaug 2015-04-08 22:50:45 -04:00
Kartikaya Gupta
9cffc6129c Bug 1146843 - Revert part of cset 33c30e283fa8 because the code is used in Fennec. r=snorp 2015-04-02 20:45:50 -04:00
Eddy Bruël
8c6ee707ad Bug 1092102 - Rename Suspend/Resume to Freeze/Thaw;r=khuey 2015-04-01 11:00:19 +02:00
Mike Hommey
ee117642af Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00