blob: cc2a4ad8bee54ba42997175410578194ff5bb521 [file] [log] [blame]
#include "mozincludes.h"
#include "LocalObjectTable.h"
LocalObjectTable::~LocalObjectTable() {
if (!dontFree) {
freeAll();
}
}
void* LocalObjectTable::getIdentityFrom(NPObject* obj) {
void** rawPtr = reinterpret_cast<void**>(reinterpret_cast<char*>(obj) + sizeof(NPClass*)
+ sizeof(uint32_t));
Debug::log(Debug::Info) << "getIdentity(obj=" << (void*)obj << "): class=" << (void*)obj->_class
<< ", bytes:";
for (int i = 0; i< 4; ++i) {
Debug::log(Debug::Info) << " " << rawPtr[i];
}
Debug::log(Debug::Info) << Debug::flush;
return obj;
}