Beispiel #1
0
void
AudioBuffer::SetRawChannelContents(uint32_t aChannel, float* aContents)
{
  MOZ_ASSERT(!GetWrapperPreserveColor() && !mSharedChannels,
             "The AudioBuffer object should not have been handed to JS or have C++ callers neuter its typed array");
  PodCopy(JS_GetFloat32ArrayData(mJSChannels[aChannel]), aContents, mLength);
}
Beispiel #2
0
bool
WorkerGlobalScope::IsSecureContext() const
{
  bool globalSecure =
    JS_GetIsSecureContext(js::GetObjectCompartment(GetWrapperPreserveColor()));
  MOZ_ASSERT(globalSecure == mWorkerPrivate->IsSecureContext());
  return globalSecure;
}
JSObject*
DOMBindingBase::GetJSObject() const
{
  // Make sure that the public method results in the same bits as our private
  // method.
  MOZ_ASSERT(GetJSObjectFromBits() == GetWrapperPreserveColor());
  return GetJSObjectFromBits();
}
Beispiel #4
0
bool WorkerGlobalScope::IsSecureContext() const {
  bool globalSecure = JS::GetIsSecureContext(
      js::GetNonCCWObjectRealm(GetWrapperPreserveColor()));
  MOZ_ASSERT(globalSecure == mWorkerPrivate->IsSecureContext());
  return globalSecure;
}