[Webkit-unassigned] [Bug 68303] Memory leak using web SQL DB

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 22 13:48:06 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=68303





--- Comment #3 from David Levin <levin at chromium.org>  2012-08-22 13:48:04 PST ---
(From update of attachment 159997)
View in context: https://bugs.webkit.org/attachment.cgi?id=159997&action=review

Quick comments. I didn't verify all the logic. I'll leave that for someone else.

> Source/WebCore/Modules/webdatabase/Database.cpp:71
> +    AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex);

This basically takes a mutex. It is kind of funny if you think about it to take a mutex to create one (and everytime you enter this function as well).

Instead you could use this macro to initialize currentId and then do an atomic increment.

> Source/WebCore/Modules/webdatabase/Database.cpp:210
> +    guard(PassRefPtr<Database>(this), parameters);

This isn't correct "PassRefPtr<Database>(this)". I believe you should either just be able to pass in "this" or there is another construct you can use.

> Source/WebCore/Modules/webdatabase/Database.cpp:276
> +class CloseImmediatelyTask: public ScriptExecutionContext::Task {

space before :

> Source/WebCore/Modules/webdatabase/Database.cpp:279
> +    virtual ~CloseImmediatelyTask() { }

Why?

> Source/WebCore/Modules/webdatabase/Database.cpp:297
> +        m_scriptExecutionContext->postTask(CloseImmediatelyTask::create(this));

Consider using createCallbackTask instead.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list