summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/mock/mediasource/MockBox.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/mock/mediasource/MockBox.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/platform/mock/mediasource/MockBox.cpp')
-rw-r--r--Source/WebCore/platform/mock/mediasource/MockBox.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/WebCore/platform/mock/mediasource/MockBox.cpp b/Source/WebCore/platform/mock/mediasource/MockBox.cpp
index 286e81b49..c8b134e51 100644
--- a/Source/WebCore/platform/mock/mediasource/MockBox.cpp
+++ b/Source/WebCore/platform/mock/mediasource/MockBox.cpp
@@ -10,10 +10,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -28,9 +28,13 @@
#if ENABLE(MEDIA_SOURCE)
+#include <JavaScriptCore/HeapInlines.h>
+#include <JavaScriptCore/JSCJSValueInlines.h>
+#include <JavaScriptCore/TypedArrayInlines.h>
#include <runtime/ArrayBuffer.h>
#include <runtime/DataView.h>
#include <runtime/Int8Array.h>
+#include <wtf/NeverDestroyed.h>
#include <wtf/text/StringBuilder.h>
namespace WebCore {
@@ -76,7 +80,7 @@ MockTrackBox::MockTrackBox(ArrayBuffer* data)
const String& MockTrackBox::type()
{
- DEFINE_STATIC_LOCAL(String, trak, (ASCIILiteral("trak")));
+ static NeverDestroyed<String> trak(ASCIILiteral("trak"));
return trak;
}
@@ -105,14 +109,14 @@ MockInitializationBox::MockInitializationBox(ArrayBuffer* data)
const String& MockInitializationBox::type()
{
- DEFINE_STATIC_LOCAL(String, init, (ASCIILiteral("init")));
+ static NeverDestroyed<String> init(ASCIILiteral("init"));
return init;
}
MockSampleBox::MockSampleBox(ArrayBuffer* data)
: MockBox(data)
{
- ASSERT(m_length == 29);
+ ASSERT(m_length == 30);
RefPtr<JSC::DataView> view = JSC::DataView::create(data, 0, data->byteLength());
int32_t timeScale = view->get<int32_t>(8, true);
@@ -128,11 +132,12 @@ MockSampleBox::MockSampleBox(ArrayBuffer* data)
m_trackID = view->get<int32_t>(24, true);
m_flags = view->get<uint8_t>(28, true);
+ m_generation = view->get<uint8_t>(29, true);
}
const String& MockSampleBox::type()
{
- DEFINE_STATIC_LOCAL(String, smpl, (ASCIILiteral("smpl")));
+ static NeverDestroyed<String> smpl(ASCIILiteral("smpl"));
return smpl;
}