Skip to content
Permalink
Browse files
2010-07-19 Victor Wang <victorw@chromium.org>
        Reviewed by Darin Fisher.

        [Chromium] Add webkit api reset to WebIDBDatabaseError and WebIDBKey
        and refactor their destructors for chromium multi dll build.

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

        * public/WebIDBDatabaseError.h:
        (WebKit::WebIDBDatabaseError::~WebIDBDatabaseError):
        * public/WebIDBKey.h:
        (WebKit::WebIDBKey::~WebIDBKey):
        * src/WebIDBDatabaseError.cpp:
        (WebKit::WebIDBDatabaseError::reset):
        * src/WebIDBKey.cpp:
        (WebKit::WebIDBKey::reset):


Canonical link: https://commits.webkit.org/54593@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Victor Wang committed Jul 20, 2010
1 parent d9a5188 commit b29f9da30af462d558a43731b3213b4fa05e66a1
@@ -1,3 +1,21 @@
2010-07-19 Victor Wang <victorw@chromium.org>

Reviewed by Darin Fisher.

[Chromium] Add webkit api reset to WebIDBDatabaseError and WebIDBKey
and refactor their destructors for chromium multi dll build.

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

* public/WebIDBDatabaseError.h:
(WebKit::WebIDBDatabaseError::~WebIDBDatabaseError):
* public/WebIDBKey.h:
(WebKit::WebIDBKey::~WebIDBKey):
* src/WebIDBDatabaseError.cpp:
(WebKit::WebIDBDatabaseError::reset):
* src/WebIDBKey.cpp:
(WebKit::WebIDBKey::reset):

2010-07-20 Hans Wennborg <hans@chromium.org>

Reviewed by Steve Block.
@@ -40,7 +40,7 @@ namespace WebKit {
// See comment in WebIndexedDatabase for a high level overview these classes.
class WebIDBDatabaseError {
public:
WEBKIT_API ~WebIDBDatabaseError();
~WebIDBDatabaseError() { reset(); }

WEBKIT_API WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
WEBKIT_API WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); }
@@ -51,6 +51,7 @@ class WebIDBDatabaseError {
}

WEBKIT_API void assign(const WebIDBDatabaseError&);
WEBKIT_API void reset();

WEBKIT_API unsigned short code() const;
WEBKIT_API WebString message() const;
@@ -36,7 +36,7 @@ namespace WebKit {

class WebIDBKey {
public:
~WebIDBKey();
~WebIDBKey() { reset(); }

WEBKIT_API static WebIDBKey createNull();
WEBKIT_API static WebIDBKey createInvalid();
@@ -55,6 +55,7 @@ class WebIDBKey {
WEBKIT_API void assign(const WebString&);
WEBKIT_API void assign(int32_t);
WEBKIT_API void assignInvalid();
WEBKIT_API void reset();

enum Type {
NullType = 0,
@@ -40,11 +40,6 @@ using namespace WebCore;

namespace WebKit {

WebIDBDatabaseError::~WebIDBDatabaseError()
{
m_private.reset();
}

void WebIDBDatabaseError::assign(const WebIDBDatabaseError& value)
{
m_private = value.m_private;
@@ -55,6 +50,11 @@ void WebIDBDatabaseError::assign(unsigned short code, const WebString& message)
m_private = IDBDatabaseError::create(code, message);
}

void WebIDBDatabaseError::reset()
{
m_private.reset();
}

unsigned short WebIDBDatabaseError::code() const
{
return m_private->code();
@@ -36,11 +36,6 @@ using namespace WebCore;

namespace WebKit {

WebIDBKey::~WebIDBKey()
{
m_private.reset();
}

WebIDBKey WebIDBKey::createNull()
{
WebIDBKey key;
@@ -80,6 +75,11 @@ void WebIDBKey::assignInvalid()
m_private = 0;
}

void WebIDBKey::reset()
{
m_private.reset();
}

WebIDBKey::Type WebIDBKey::type() const
{
if (!m_private.get())

0 comments on commit b29f9da

Please sign in to comment.