コード例 #1
0
ファイル: AudioBuffer.cpp プロジェクト: afabbro/gecko-dev
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);
}
コード例 #2
0
ファイル: WorkerScope.cpp プロジェクト: luke-chang/gecko-1
bool
WorkerGlobalScope::IsSecureContext() const
{
  bool globalSecure =
    JS_GetIsSecureContext(js::GetObjectCompartment(GetWrapperPreserveColor()));
  MOZ_ASSERT(globalSecure == mWorkerPrivate->IsSecureContext());
  return globalSecure;
}
コード例 #3
0
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();
}
コード例 #4
0
ファイル: WorkerScope.cpp プロジェクト: jasonLaster/gecko-dev
bool WorkerGlobalScope::IsSecureContext() const {
  bool globalSecure = JS::GetIsSecureContext(
      js::GetNonCCWObjectRealm(GetWrapperPreserveColor()));
  MOZ_ASSERT(globalSecure == mWorkerPrivate->IsSecureContext());
  return globalSecure;
}