@awayfl/avm2
Version:
Virtual machine for executing AS3 code
13 lines (12 loc) • 471 B
JavaScript
import { release } from '@awayfl/swf-loader';
import { assert } from '@awayjs/graphics';
import { isValidASValue } from './initializeAXBasePrototype';
export function checkValue(value) {
if (!release) {
if (!isValidASValue(value)) {
// Stringifying the value is potentially costly, so only do it if necessary,
// even in debug mode.
assert(false, 'Value: ' + value + ' is not allowed to flow into AS3.');
}
}
}