| 372 | } |
| 373 | |
| 374 | function fetchLoadCachedData(db, fetch, onsuccess, onerror) { |
| 375 | if (!db) { |
| 376 | #if FETCH_DEBUG |
| 377 | dbg('fetch: IndexedDB not available!'); |
| 378 | #endif |
| 379 | onerror(fetch, 0, 'IndexedDB not available!'); |
| 380 | return; |
| 381 | } |
| 382 | |
| 383 | var fetch_attr = fetch + {{{ C_STRUCTS.emscripten_fetch_t.__attributes }}}; |
| 384 | var path = {{{ makeGetValue('fetch_attr', C_STRUCTS.emscripten_fetch_attr_t.destinationPath, '*') }}}; |
| 385 | path ||= {{{ makeGetValue('fetch', C_STRUCTS.emscripten_fetch_t.url, '*') }}}; |
| 386 | var pathStr = UTF8ToString(path); |