WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48064
Quota for IndexedDB should be per origin not per database
https://bugs.webkit.org/show_bug.cgi?id=48064
Summary
Quota for IndexedDB should be per origin not per database
Jeremy Orlow
Reported
2010-10-21 05:49:31 PDT
Quota for IndexedDB should be per origin not per database
Attachments
fix
(104.81 KB, patch)
2010-10-21 06:05 PDT
,
Jeremy Orlow
no flags
Details
Formatted Diff
Diff
oops
(97.00 KB, patch)
2010-10-21 06:07 PDT
,
Jeremy Orlow
no flags
Details
Formatted Diff
Diff
Patch
(100.04 KB, patch)
2010-10-25 09:28 PDT
,
Jeremy Orlow
no flags
Details
Formatted Diff
Diff
Patch
(100.17 KB, patch)
2010-10-26 06:46 PDT
,
Jeremy Orlow
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Jeremy Orlow
Comment 1
2010-10-21 06:05:55 PDT
Created
attachment 71428
[details]
fix
Jeremy Orlow
Comment 2
2010-10-21 06:06:10 PDT
Please review.
Jeremy Orlow
Comment 3
2010-10-21 06:07:52 PDT
Created
attachment 71429
[details]
oops
Andrei Popescu
Comment 4
2010-10-22 13:32:03 PDT
Looks good, some small nits below:
> WebCore/manual-tests/indexeddb-persists.html > var result = event.result.transaction([]).objectStore("test").get("key");
You don't need to pass the [] array. Not passing anything at all is equivalent.
> WebCore/storage/IDBDatabaseBackendImpl.cpp > if (databaseQuery.prepare() != SQLResultOk) > ASSERT_NOT_REACHED();
why this and not (also) return false like we do in other error cases?
> if (databaseQuery.step() == SQLResultRow)
ditto
> if (query.prepare() != SQLResultOk) > ASSERT_NOT_REACHED();
ditto
> , m_id(-1)
Make this a constant like we've done everywhere else?
Eric Seidel (no email)
Comment 5
2010-10-23 15:45:46 PDT
Attachment 71429
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/4718053
Jeremy Orlow
Comment 6
2010-10-25 09:07:57 PDT
(In reply to
comment #4
)
> Looks good, some small nits below: > > > > WebCore/manual-tests/indexeddb-persists.html > > var result = event.result.transaction([]).objectStore("test").get("key"); > > You don't need to pass the [] array. Not passing anything at all is equivalent.
As specced today, I believe null implies dynamic transaction, which is not what we're looking for here. Hopefully we get this sorted out next week at TPAC.
> > WebCore/storage/IDBDatabaseBackendImpl.cpp > > if (databaseQuery.prepare() != SQLResultOk) > > ASSERT_NOT_REACHED();
Done.
> why this and not (also) return false like we do in other error cases? > > > if (databaseQuery.step() == SQLResultRow) > > ditto
Because this isn't fatal. It's hardly even worth the check.
> > if (query.prepare() != SQLResultOk) > > ASSERT_NOT_REACHED(); > > ditto
Done.
> > , m_id(-1) > > Make this a constant like we've done everywhere else?
Will do.
Jeremy Orlow
Comment 7
2010-10-25 09:28:59 PDT
Created
attachment 71761
[details]
Patch
Andrei Popescu
Comment 8
2010-10-26 04:38:54 PDT
(In reply to
comment #7
)
> Created an attachment (id=71761) [details] > Patch
LGTM
Steve Block
Comment 9
2010-10-26 05:43:05 PDT
Comment on
attachment 71761
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=71761&action=review
> WebCore/ChangeLog:23 > +
Add a comment about the map by db name not origin?
> WebCore/storage/IDBFactoryBackendImpl.cpp:122 > + String uniqueIdentifier = fileIdentifier + "_" + name;
Use @ for safety?
Steve Block
Comment 10
2010-10-26 06:37:49 PDT
Comment on
attachment 71761
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=71761&action=review
>> WebCore/storage/IDBFactoryBackendImpl.cpp:122 >> + String uniqueIdentifier = fileIdentifier + "_" + name; > > Use @ for safety?
If we allow underscores in the domain name, I think it's unsafe to use an underscore to join the two components, since databaseIdentifier() doesn't escape underscores ...
http://www.foo.com
, ".com_80_name" -> http_www.foo.com_80_.com_80_name
http://www.foo.com_80_.com
, "name" -> http_www.foo.com_80_.com_80_name Using '@' avoids the problem as the hostname can't contain an '@'.
Jeremy Orlow
Comment 11
2010-10-26 06:46:12 PDT
Created
attachment 71869
[details]
Patch
Jeremy Orlow
Comment 12
2010-10-26 06:47:43 PDT
(In reply to
comment #10
)
> (From update of
attachment 71761
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=71761&action=review
> > >> WebCore/storage/IDBFactoryBackendImpl.cpp:122 > >> + String uniqueIdentifier = fileIdentifier + "_" + name; > > > > Use @ for safety? > > If we allow underscores in the domain name, I think it's unsafe to use an underscore to join the two components, since databaseIdentifier() doesn't escape underscores ... > >
http://www.foo.com
, ".com_80_name" -> http_www.foo.com_80_.com_80_name >
http://www.foo.com_80_.com
, "name" -> http_www.foo.com_80_.com_80_name > > Using '@' avoids the problem as the hostname can't contain an '@'.
I agree this is better. Fixed other issue. Please take another look?
Steve Block
Comment 13
2010-10-26 06:54:07 PDT
Comment on
attachment 71869
[details]
Patch r=me
Jeremy Orlow
Comment 14
2010-10-26 08:21:50 PDT
Comment on
attachment 71869
[details]
Patch Clearing flags on attachment: 71869 Committed
r70522
: <
http://trac.webkit.org/changeset/70522
>
Jeremy Orlow
Comment 15
2010-10-26 08:22:01 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug