Since this stuff is a property on the browsing context, this only makes sense
as a security check. But now that we're using a DialogValueHolder, the origin
checks are taken care of. So we can kill this off.
The spec currently has returnValue as a DOMString, but this doesn't match
reality given my testing. I filed [1] to fix it.
Note that nsGlobalModalWindow is already set up to CC mReturnValue. Since
we're swapping in another CC-ed container class, we don't need to make any
changes here.
[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=21771
This is correct by my reading of the spec. Quoting:
The dialogArguments IDL attribute, on getting, must check whether its browsing
context's active document's origin is the same as the dialog arguments' origin.
If it is, then the browsing context's dialog arguments must be returned
unchanged. Otherwise, if the dialog arguments are an object, then the empty
string must be returned, and if the dialog arguments are not an object, then
the stringification of the dialog arguments must be returned.
This patch is bigger than I'd like it to be, but there are a lot of interlocked
dependencies and I eventually decided it was easier to just lump it together.
The semantics of |showModalDialog|/|window.dialogArguments| (an web-exposed
HTML5 feature) and |openDialog|/|window.arguments| (a XUL-proprietary feature)
are quite different. The former is essentially a security-checked JSVal, while
the latter gets converted into an array. We handled them together in the old
world, which led to a lot of confusion and muddled semantics. This patch
separates them.
This patch also eschews the roundabout resolve hook for dialogArguments in favor
of returning them directly from the XPIDL getter. This better matches the
behavior in the spec, especially because it allows dialogArguments to live on
the outer as they're supposed to, rather than the first inner that happens to
end up in the docshell. All in all, this should make this all very
straightforward to convert WebIDL when the time comes.
The current spec on the origin checks here is pretty fictional, so I've filed
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21932 to fix it. This patch
should more or less preserve the current security behavior.
While the mArguments invariant should hold for _outers_, it doesn't necessarily
hold for inners, so this assertion fires reliably in automation. If mCleanedUp
is true then mArguments is definitely null, so let's disentangle this from
mArguments and be clearer about the invariants we expect.
Tracking this with CHROME_MODAL is problematic, because that gets inherited by
any dependent windows opened by the modal content window, which may or may not
be modal content windows themselves. Thankfully, we have a few free bits lying
around.
Here we make the non-realtime graphs to go to sleep until they're shut down
from the main thread. This allows us to use the common forced shutdown code
path in MediaStreamGraphImpl::RunThread. We also need to delete the graph
object when the last message is dispatched to it.
In addition, we need to make sure that the AudioNodes also get released when
they're no longer needed. To do this, we need for force the SelfReference of
AudioBufferSourceNodes to be released when the context is shut down, and also
trigger the destruction of the graph there.
We use a custom AudioNodeEngine for the destination nodes belonging to
OfflineAudioContexts, and there we record the rendered buffer. Once the buffer
is full, we resample it if the sampling rate of the OfflineAudioContext is
different than the ideal sampling rate, and then we hand it off to the main
thread in order for the complete event to be dispatched.
We offload most of the logic for OfflineAudioContext to the destination node,
since that's where the sample recording needs to happen, so doing this will
make the code simpler.
The method DeviceStorageFile::CreateUnique fails for files with an
unknown extension. It calls DeviceStorageFileChecker::GetTypeFromFileName
to retrieve the default location. The returned value is "Unknown", which
is passed to the constructor of DeviceStorageFile. This class doesn't
handle "Unknown" in it's initialization, and fails without creating a
file.
This patch changes the default return value of GetTypeFromFileName to the
constant DEVICESTORAGE_SDCARD. All files with unknown extension will now
be stored on the sd card.