コード例 #1
0
void DOMApplicationCache::add(const KURL& url, ExceptionCode& ec)
{
    ApplicationCache* cache = associatedCache();
    if (!cache) {
        ec = INVALID_STATE_ERR;
        return;
    }
 
    if (!url.isValid()) {
        ec = SYNTAX_ERR;
        return;
    }
        
    if (!cache->addDynamicEntry(url)) {
        // This should use the (currently not specified) security exceptions in HTML5 4.3.4
        ec = SECURITY_ERR;
    }
}