This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.
It seems that the `!` in the header forces the compiler to keep it in
the output. I believe older compiler releases did this purely based
on `@license`.
Issue #2638
Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
In many places, we check error codes on shaka.util.Error. But the
compiler doesn't know that what is caught in "catch" is that type, so
we add type assertions.
In some cases, we know that other types may also be thrown, so there
are also some runtime checks. Some of these had to be refactored to
allow the compiler to correctly infer types.
Change-Id: I053bd7e96213c689aae3889315052dd402124690
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
This changes several classes to use the Destroyer class to handle
destroy(). This also changes the behavior to not ignore destruction
and instead throw a new error. This is more clear for callers and
ensures we propagate errors.
Change-Id: I756c085639558509c22e5c43d69ddf4acd28d46f
Replace the last use of |Destroyer.with| in the library. The final use
was in Storage, and this CL replaces that last usage with try-finally.
Close#1516
Change-Id: Ic0946a564b66a48b567ffd6d1cfd4b9ec76fc039
Some of these issues were found by the Closure Compiler linter,
which we are not currently using here. I will try to re-enable it
in a follow-up change.
Change-Id: Ie6e75f2b5a1e0f888c3dfbc78ed9cf254d2738bb
There was an extra line that was not detected before. This change
removes the line that now causes linting failures.
Change-Id: Idb0d5dfacfc0aeabeef5b22face1e5606a28175a
To make it easier to ensure that destroy logic for a class is only called
once, Destroyer can be used to manage that logic for any IDestroyable
implementation.
Change-Id: If69b815882a68e31191230adb08f5da8f51fc3d2
Created the Destroyer class to handle working with IDestroyable so that
IDestroyable can be a simple interface (no more static methods).
Change-Id: I5afd915b895a4c60d758475a2b879bf0eb0096c9