-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avm2: Avoid marking interface method definitions with VM_INTERNAL
Our asc.jar doesn't seem to apply a version suffix to namespaces for interface method definitions. This was causing these methods to get marked as VM_INTERNAL when we loaded playerglobals, preventing SWF from invoking these methods through the interface (e.g. having a variable of type `IEventDispatcher`, and calling `dispatchEvent` on it)
- Loading branch information
1 parent
98ebc33
commit 5c37533
Showing
16 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package flash.desktop { | ||
import flash.utils.IDataInput; | ||
import flash.events.ErrorEvent; | ||
|
||
[API("668")] // AIR 2.0 | ||
public interface IFilePromise { | ||
function get isAsync():Boolean; | ||
function get relativePath():String; | ||
function close():void; | ||
function open():IDataInput; | ||
function reportError(e:ErrorEvent):void | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
flash.net.DatagramSocket is inaccessible from Flash Player | ||
flash.desktop.IFilePromise is inaccessible from Flash Player |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package { | ||
|
||
import flash.display.MovieClip; | ||
import flash.utils.getDefinitionByName; | ||
|
||
public class Test extends MovieClip { | ||
|
||
|
||
public function Test() { | ||
trace("IFilePromise: " + getDefinitionByName("flash.desktop.IFilePromise")); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
IFilePromise: [class IFilePromise] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
num_ticks = 1 | ||
|
||
[player_options] | ||
runtime = "AIR" |
22 changes: 22 additions & 0 deletions
22
tests/tests/swfs/avm2/eventdispatcher_interface_invoke/Test.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package { | ||
|
||
import flash.display.MovieClip; | ||
import flash.events.IEventDispatcher; | ||
import flash.events.Event; | ||
|
||
|
||
public class Test extends MovieClip { | ||
|
||
|
||
public function Test() { | ||
this.invokeDispatcher(new MovieClip()); | ||
} | ||
|
||
public function invokeDispatcher(dispatch: IEventDispatcher) { | ||
// This method is invoked on the interface, not a concrete class | ||
dispatch.dispatchEvent(new Event("myEvent")); | ||
trace("Called dispatchEvent!"); | ||
} | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
tests/tests/swfs/avm2/eventdispatcher_interface_invoke/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Called dispatchEvent! |
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions
1
tests/tests/swfs/avm2/eventdispatcher_interface_invoke/test.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_ticks = 1 |