Beispiel #1
0
void V8GCController::unregisterGlobalHandle(void* host, v8::Persistent<v8::Value> handle)
{
    GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
    ASSERT(globalHandleMap.contains(*handle));
    GlobalHandleInfo* info = globalHandleMap.take(*handle);
    ASSERT(info->m_host == host);
    delete info;
}
void V8GCController::registerGlobalHandle(GlobalHandleType type, void* host, v8::Persistent<v8::Value> handle)
{
//SAMSUNG_WEB_WORKER_CHANGES >>
	GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
	ASSERT(!globalHandleMap.contains(*handle));
	globalHandleMap.set(*handle, new GlobalHandleInfo(host, type));
//SAMSUNG_WEB_WORKER_CHANGES <<
}
Beispiel #3
0
// The function is the place to set the break point to inspect
// live global handles. Leaks are often come from leaked global handles.
static void enumerateGlobalHandles()
{
    GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
    for (GlobalHandleMap::iterator it = globalHandleMap.begin(), end = globalHandleMap.end(); it != end; ++it) {
        GlobalHandleInfo* info = it->second;
        UNUSED_PARAM(info);
        v8::Value* handle = it->first;
        UNUSED_PARAM(handle);
    }
}
void V8GCController::unregisterGlobalHandle(void* host, v8::Persistent<v8::Value> handle)
{
//SAMSUNG_WEB_WORKER_CHANGES >>
	GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
	ASSERT(globalHandleMap.contains(*handle));
	GlobalHandleInfo* info = globalHandleMap.take(*handle);
    /*ASSERT(globalHandleMap().contains(*handle));
    GlobalHandleInfo* info = globalHandleMap().take(*handle);*/
//SAMSUNG_WEB_WORKER_CHANGES <<
    ASSERT(info->m_host == host);
    delete info;
}
// The function is the place to set the break point to inspect
// live global handles. Leaks are often come from leaked global handles.
static void enumerateGlobalHandles()
{
//SAMSUNG_WEB_WORKER_CHANGES >>
	GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
	for (GlobalHandleMap::iterator it = globalHandleMap.begin(), end = globalHandleMap().end(); it != end; ++it) {
    /*for (GlobalHandleMap::iterator it = globalHandleMap().begin(), end = globalHandleMap().end(); it != end; ++it) {*/
//SAMSUNG_WEB_WORKER_CHANGES <<
        GlobalHandleInfo* info = it->second;
        UNUSED_PARAM(info);
        v8::Value* handle = it->first;
        UNUSED_PARAM(handle);
    }
}
Beispiel #6
0
void V8GCController::registerGlobalHandle(GlobalHandleType type, void* host, v8::Persistent<v8::Value> handle)
{
    GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
    ASSERT(!globalHandleMap.contains(*handle));
    globalHandleMap.set(*handle, new GlobalHandleInfo(host, type));
}