Shaka Player Embedded
|
#include <backing_object.h>
Public Member Functions | |
BackingObject () | |
void | Trace (memory::HeapTracer *tracer) const override |
bool | IsRootedAlive () const override |
std::string | name () const |
virtual BackingObjectFactoryBase * | factory () const =0 |
bool | DerivedFrom (const std::string &base) |
ReturnVal< JsValue > | JsThis () const |
void | SetJsThis (Handle< JsObject > this_) |
![]() | |
virtual | ~Traceable () |
virtual bool | IsShortLived () const |
Static Public Member Functions | |
static void * | operator new[] (size_t size)=delete |
static void | operator delete[] (void *)=delete |
Static Public Attributes | |
static constexpr const size_t | kInternalFieldCount = 2 |
![]() | |
static constexpr const uint64_t | kShortLiveDurationMs = 5000 |
Protected Member Functions | |
~BackingObject () override | |
Friends | |
class | memory::ObjectTracker |
A base type for objects exposed to JavaScript. This is the backing type for a JavaScript object. This contains a weak pointer to the object that it backs.
Definition at line 56 of file backing_object.h.
shaka::BackingObject::BackingObject | ( | ) |
Definition at line 22 of file backing_object.cc.
|
overrideprotected |
Definition at line 26 of file backing_object.cc.
bool shaka::BackingObject::DerivedFrom | ( | const std::string & | base | ) |
Definition at line 55 of file backing_object.cc.
|
pure virtual |
|
overridevirtual |
Gets whether this object is defined to be alive because of a JavaScript root reference.
Reimplemented from shaka::memory::Traceable.
Definition at line 43 of file backing_object.cc.
ReturnVal< JsValue > shaka::BackingObject::JsThis | ( | ) | const |
Gets the JavaScript object that represents this instance. It is only valid to call this method on the Event thread.
Definition at line 59 of file backing_object.cc.
std::string shaka::BackingObject::name | ( | ) | const |
Definition at line 51 of file backing_object.cc.
|
staticdelete |
|
staticdelete |
void shaka::BackingObject::SetJsThis | ( | Handle< JsObject > | this_ | ) |
Sets the JavaScript instance that represents this object.
Definition at line 71 of file backing_object.cc.
|
overridevirtual |
Called during a GC run. This should call HeapTracer::Trace on all Traceable members. Be sure to call the base method when overriding.
Implements shaka::memory::Traceable.
Reimplemented in shaka::js::mse::TrackList< AudioTrack, media::MediaTrack >, shaka::js::mse::TrackList< VideoTrack, media::MediaTrack >, and shaka::js::mse::TrackList< TextTrack, media::TextTrack >.
Definition at line 35 of file backing_object.cc.
|
friend |
Definition at line 92 of file backing_object.h.
|
static |
The number of internal fields in a wrapper object.
Definition at line 61 of file backing_object.h.