Skip to content

Commit 312b88b

Browse files
Merge branch 'master' into stencil-methods
2 parents 2a96304 + cdcdc9d commit 312b88b

File tree

170 files changed

+11960
-11611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+11960
-11611
lines changed

Cargo.lock

Lines changed: 23 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ clap = { version = "4.5.40", features = ["derive"] }
5555
cpal = "0.15.3"
5656
anyhow = "1.0"
5757
slotmap = "1.0.7"
58-
async-channel = "2.3.1"
58+
async-channel = "2.5.0"
5959
bitflags = "2.9.1"
6060
bytemuck = "1.23.1"
6161
chrono = { version = "0.4.41", default-features = false }
@@ -74,7 +74,7 @@ url = "2.5.2"
7474
# Make sure to match wasm-bindgen-cli version to this everywhere.
7575
wasm-bindgen = "=0.2.100"
7676
walkdir = "2.5.0"
77-
tokio = "1.45.1"
77+
tokio = "1.46.1"
7878
# Switching from the `async-std` to the `tokio` runtime, which we depend on anyway.
7979
rfd = { version = "0.15.3", default-features = false, features = ["tokio", "xdg-portal"] }
8080

core/src/avm2/error.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use ruffle_wstr::WString;
22

33
use crate::avm2::object::TObject;
44
use crate::avm2::{Activation, AvmString, Class, Multiname, Value};
5-
use std::fmt::Debug;
5+
use std::fmt::{Debug, Display};
66
use std::mem::size_of;
77

88
use super::function::display_function;
@@ -571,6 +571,23 @@ pub fn make_error_2008<'gc>(activation: &mut Activation<'_, 'gc>, param_name: &s
571571
}
572572
}
573573

574+
#[inline(never)]
575+
#[cold]
576+
pub fn make_error_2012<'gc>(
577+
activation: &mut Activation<'_, 'gc>,
578+
class_name: impl Display,
579+
) -> Error<'gc> {
580+
let err = argument_error(
581+
activation,
582+
&format!("Error #2012: {class_name} class cannot be instantiated."),
583+
2012,
584+
);
585+
match err {
586+
Ok(err) => Error::avm_error(err),
587+
Err(err) => err,
588+
}
589+
}
590+
574591
#[inline(never)]
575592
#[cold]
576593
pub fn make_error_2025<'gc>(activation: &mut Activation<'_, 'gc>) -> Error<'gc> {

core/src/avm2/globals.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ pub struct SystemClasses<'gc> {
175175
pub worker: ClassObject<'gc>,
176176
pub workerdomain: ClassObject<'gc>,
177177
pub messagechannel: ClassObject<'gc>,
178+
pub securitydomain: ClassObject<'gc>,
178179
}
179180

180181
#[derive(Clone, Collect)]
@@ -341,6 +342,7 @@ impl<'gc> SystemClasses<'gc> {
341342
worker: object,
342343
workerdomain: object,
343344
messagechannel: object,
345+
securitydomain: object,
344346
}
345347
}
346348
}
@@ -709,6 +711,7 @@ pub fn init_native_system_classes(activation: &mut Activation<'_, '_>) {
709711
("flash.utils", "Dictionary", dictionary),
710712
("flash.system", "ApplicationDomain", application_domain),
711713
("flash.system", "MessageChannel", messagechannel),
714+
("flash.system", "SecurityDomain", securitydomain),
712715
("flash.system", "Worker", worker),
713716
("flash.system", "WorkerDomain", workerdomain),
714717
("flash.text", "Font", font),

core/src/avm2/globals/flash/accessibility/Accessibility.as

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package flash.accessibility {
22
import __ruffle__.stub_method;
33
import flash.display.DisplayObject;
44

5+
[Ruffle(Abstract)]
56
public final class Accessibility {
67
private static var _active:Boolean;
78

core/src/avm2/globals/flash/display.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! `flash.display` namespace
22
3-
pub mod avm1movie;
43
pub mod bitmap;
54
pub mod bitmap_data;
65
pub mod display_object;

core/src/avm2/globals/flash/display/AVM1Movie.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package flash.display {
22
import __ruffle__.stub_method;
33

4-
[Ruffle(InstanceAllocator)]
4+
[Ruffle(Abstract)]
55
public class AVM1Movie extends DisplayObject {
66
public function AVM1Movie() {
77
// Should be inaccessible

core/src/avm2/globals/flash/display/Graphics.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package flash.display
33
import flash.geom.Matrix;
44
import __ruffle__.stub_method;
55

6-
// note: no need for an allocator, as it's never constructed from AS
6+
[Ruffle(Abstract)]
77
public final class Graphics
88
{
99
public function Graphics()

core/src/avm2/globals/flash/display/Stage3D.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package flash.display {
66
import flash.utils.setTimeout;
77
import __ruffle__.stub_setter;
88

9-
[Ruffle(InstanceAllocator)]
109
[API("674")]
10+
[Ruffle(Abstract)]
1111
public class Stage3D extends EventDispatcher {
1212
public native function get context3D():Context3D;
1313
private native function requestContext3D_internal(context3DRenderMode:String, profiles:Vector.<String>):void;

core/src/avm2/globals/flash/display/avm1movie.rs

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)