Skip to content

Commit 2a45486

Browse files
committed
core: Turn Loader into a struct
1 parent 4be9b08 commit 2a45486

File tree

5 files changed

+75
-104
lines changed

5 files changed

+75
-104
lines changed

core/src/avm1/activation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ impl<'a, 'gc> Activation<'a, 'gc> {
11871187
} else {
11881188
let level = self.get_or_create_level(level_id);
11891189
let future = self.context.load_manager.load_movie_into_clip(
1190-
self.context.player.clone(),
1190+
self.context.player_handle(),
11911191
level,
11921192
Request::get(url.to_string()),
11931193
None,
@@ -1314,7 +1314,7 @@ impl<'a, 'gc> Activation<'a, 'gc> {
13141314
NavigationMethod::from_send_vars_method(action.send_vars_method()),
13151315
);
13161316
let future = self.context.load_manager.load_movie_into_clip(
1317-
self.context.player.clone(),
1317+
self.context.player_handle(),
13181318
clip_target,
13191319
request,
13201320
None,
@@ -1339,7 +1339,7 @@ impl<'a, 'gc> Activation<'a, 'gc> {
13391339
}
13401340
} else {
13411341
let future = self.context.load_manager.load_movie_into_clip(
1342-
self.context.player.clone(),
1342+
self.context.player_handle(),
13431343
clip_target,
13441344
Request::get(url.to_utf8_lossy().into_owned()),
13451345
None,

core/src/avm1/globals/movie_clip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ fn load_movie<'gc>(
15961596
let target_obj = target.object1().coerce_to_object(activation);
15971597
let request = activation.object_into_request(target_obj, url, method);
15981598
let future = activation.context.load_manager.load_movie_into_clip(
1599-
activation.context.player.clone(),
1599+
activation.context.player_handle(),
16001600
DisplayObject::MovieClip(target),
16011601
request,
16021602
None,

core/src/avm1/globals/movie_clip_loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn load_clip<'gc>(
6767
};
6868
if let Some(target) = target {
6969
let future = activation.context.load_manager.load_movie_into_clip(
70-
activation.context.player.clone(),
70+
activation.context.player_handle(),
7171
target,
7272
Request::get(url.to_utf8_lossy().into_owned()),
7373
None,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub fn load<'gc>(
109109

110110
let url = request.url().to_string();
111111
let future = activation.context.load_manager.load_movie_into_clip(
112-
activation.context.player.clone(),
112+
activation.context.player_handle(),
113113
content.into(),
114114
request,
115115
Some(url),

0 commit comments

Comments
 (0)