gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Re: [Gnash-commit] /srv/bzr/gnash/trunk r11254: Implemented


From: Benjamin Wolsey
Subject: [Gnash-dev] Re: [Gnash-commit] /srv/bzr/gnash/trunk r11254: Implemented System_security_allowDomain. Added vector data structures and accessor functions to System_as.cpp to store domain name strings for allowing data access to swf's. This currently does nothing in gnash since we don't deal with inter-swf access in the same way as Adobe.
Date: Wed, 15 Jul 2009 08:05:27 +0200

> What test are you doing here? The tests I have run (haxe) show that this 
> function is returning null in gflashplayer. The documentation claims 
> that this function is void.

When you do tests, it's best to add them to the testsuite. Otherwise
someone can change things you've tested without getting any test
failures, and your work gets wasted. Here, the behaviour is different
for AS2 and AS3. Try it in haxe:

import flash.Lib;
import flash.System;

class Sec {
    static function main()
    {
        flash.Lib.trace(untyped System.security.allowDomain("um"));
    }
}

or in ming (much better):

trace(System.security.allowDomain("erm"));

In AS3 it indeed returns a null or undefined value, but this function
runs in AS2. Because it may one day run in AS3 as well, you can easily
handle both by returning a different type of value depending on the VM
version (isAS3(fn)), or leave a comment.

This kind of detail can sometimes be crucial. Code like this:

stop();
if (System.security.allowDomain("w")) { play(); };

will fail if Gnash doesn't get it right. It may well be stupid and
useless code, but you should never underestimate how much stupid code is
out there.

bwy

--
Yes, YouTube does work in Gnash
http://www.gnu.org/software/gnash/

Benjamin Wolsey, Software Developer - http://benjaminwolsey.de

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]