mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
*not part of the build*
fixes for 78866 and 78865
This commit is contained in:
parent
9a6566397d
commit
386b829e9b
@ -30,6 +30,7 @@
|
||||
class bcIORB {
|
||||
public:
|
||||
virtual bcOID RegisterStub(bcIStub *stub) = 0;
|
||||
virtual void RegisterStubWithOID(bcIStub *stub, bcOID *oid) = 0;
|
||||
virtual bcICall * CreateCall(bcIID *, bcOID *, bcMID) = 0;
|
||||
virtual int SendReceive(bcICall *) = 0;
|
||||
//virtual IThread * GetThread(TID) = 0;
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "Call.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
|
||||
class bcOIDKey : public nsHashKey {
|
||||
protected:
|
||||
bcOID key;
|
||||
@ -57,8 +56,14 @@ ORB::~ORB() {
|
||||
}
|
||||
|
||||
bcOID ORB::RegisterStub(bcIStub *stub) {
|
||||
stubs->Put(new bcOIDKey(currentID),stub);
|
||||
return currentID++;
|
||||
bcOID oid = GenerateOID();
|
||||
stubs->Put(new bcOIDKey(oid),stub);
|
||||
return oid;
|
||||
}
|
||||
|
||||
void ORB:: RegisterStubWithOID(bcIStub *stub, bcOID *oid) {
|
||||
stubs->Put(new bcOIDKey(*oid),stub);
|
||||
return;
|
||||
}
|
||||
|
||||
bcICall * ORB::CreateCall(bcIID *iid, bcOID *oid, bcMID mid) {
|
||||
@ -88,3 +93,21 @@ bcIStub * ORB::GetStub(bcOID *oid) {
|
||||
|
||||
|
||||
|
||||
struct bcOIDstruct {
|
||||
PRUint16 high;
|
||||
PRUint16 low;
|
||||
};
|
||||
bcOID ORB::GenerateOID() {
|
||||
bcOID oid;
|
||||
bcOIDstruct oidStruct;
|
||||
oidStruct.low = currentID++;
|
||||
oidStruct.high = ((PRUint32)this);
|
||||
oid = *(bcOID*)&oidStruct;
|
||||
return oid;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -30,11 +30,13 @@ public:
|
||||
ORB();
|
||||
virtual ~ORB();
|
||||
virtual bcOID RegisterStub(bcIStub *stub);
|
||||
virtual void RegisterStubWithOID(bcIStub *stub, bcOID *oid);
|
||||
virtual bcICall * CreateCall(bcIID *, bcOID *, bcMID);
|
||||
virtual int SendReceive(bcICall *);
|
||||
private:
|
||||
bcIStub * GetStub(bcOID *);
|
||||
bcOID GenerateOID();
|
||||
nsHashtable *stubs;
|
||||
int currentID;
|
||||
unsigned int currentID;
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user