Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avm2: Use correct null parameter error in registerClassAlias #14598

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions core/src/avm2/globals/flash/net.as
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ package flash.net {
public native function navigateToURL(request:URLRequest, window:String = null):void;

public function registerClassAlias(name:String, object:Class):void {
torokati44 marked this conversation as resolved.
Show resolved Hide resolved
if (name == null || object == null) {
throw new TypeError("FIXME - what error should I use");
if (name == null) {
throw new TypeError("Error #2007: Parameter aliasName must be non-null.", 2007);
}
if (object == null) {
throw new TypeError("Error #2007: Parameter classObject must be non-null.", 2007);
}

this._aliasToClass[name] = object;
this._classToAlias[object] = name;
}
Expand Down