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); }
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(); }
bool WorkerGlobalScope::IsSecureContext() const { bool globalSecure = JS::GetIsSecureContext( js::GetNonCCWObjectRealm(GetWrapperPreserveColor())); MOZ_ASSERT(globalSecure == mWorkerPrivate->IsSecureContext()); return globalSecure; }