[prev in list] [next in list] [prev in thread] [next in thread]
List: e-lang
Subject: [e-lang] bug in makeCareTaker.emaker
From: "Martin Scheffler" <martinscheffler () googlemail ! com>
Date: 2007-01-24 15:40:18
Message-ID: 372f5c120701240740n1e63f8d8kac8dfc6acf64c3b1 () mail ! gmail ! com
[Download RAW message or body]
I think I have found a small, uncritical bug in makeCareTaker.emaker:
pragma.syntax("0.9")
def makeWeakPtr:=<unsafe:org.erights.e.elib.vat.makeWeakPtr>
def makeGrantMgr:=<import:org.erights.e.facet.makeGrantMgrAuthor>(makeWeakPtr)
def grantMgr:=makeGrantMgr()
def object {
to __reactToLostClient(c) :void {println("Lost a client!")}
}
#create a capability
def forwarder:=grantMgr.makeForwarder("object",object)
#the powerbox function revokeAll revokes this forwarder
grantMgr.revoke("This forwarder was revoked!", "object")
#client closes connection, reactToLostClient gets called
forwarder.__reactToLostClient(null)
#problem: This forwarder was revoked!
---------------------------------------
In makeCareTaker.emaker:
to __reactToLostClient(problem) :void {
underlying.__reactToLostClient(problem)
}
should probably be
to __reactToLostClient(problem) :void {
if (!Ref.isBroken(underlying)) {
underlying.__reactToLostClient(problem)
}
}
Cheers, Martin
_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic