diff options
author | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 20:52:30 +0000 |
---|---|---|
committer | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 20:52:30 +0000 |
commit | be740292c9d0a57768be27651e9d929db97e0c4f (patch) | |
tree | e0aebd60fd1ac6ba890de6ee67cf8d0a3b13ee6e /webkit/port/page | |
parent | b7b0da54c024999aa8f21f0466fc68d2e1fc61f3 (diff) | |
download | chromium_src-be740292c9d0a57768be27651e9d929db97e0c4f.zip chromium_src-be740292c9d0a57768be27651e9d929db97e0c4f.tar.gz chromium_src-be740292c9d0a57768be27651e9d929db97e0c4f.tar.bz2 |
Get Database compiling on Chromium. Note that because we aren't generating the
bindings, this doesn't actually expose the DB code to web pages.
Review URL: http://codereview.chromium.org/7982
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/page')
-rw-r--r-- | webkit/port/page/inspector/InspectorController.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/webkit/port/page/inspector/InspectorController.cpp b/webkit/port/page/inspector/InspectorController.cpp index 43f41ae..25f6311 100644 --- a/webkit/port/page/inspector/InspectorController.cpp +++ b/webkit/port/page/inspector/InspectorController.cpp @@ -74,8 +74,10 @@ #if ENABLE(DATABASE) #include "Database.h" +#if USE(JSC) #include "JSDatabase.h" #endif +#endif #if ENABLE(JAVASCRIPT_DEBUGGER) #include "JavaScriptDebugServer.h" @@ -371,25 +373,15 @@ struct InspectorDatabaseResource : public RefCounted<InspectorDatabaseResource> return adoptRef(new InspectorDatabaseResource(database, domain, name, version)); } - void setScriptObject(JSContextRef context, JSObjectRef newScriptObject) + void setScriptObject() { - if (scriptContext && scriptObject) - JSValueUnprotect(scriptContext, scriptObject); - - scriptObject = newScriptObject; - scriptContext = context; - - ASSERT((context && newScriptObject) || (!context && !newScriptObject)); - if (context && newScriptObject) - JSValueProtect(context, newScriptObject); + // TODO(aa): Implement this. } RefPtr<Database> database; String domain; String name; String version; - JSContextRef scriptContext; - JSObjectRef scriptObject; private: InspectorDatabaseResource(Database* database, const String& domain, const String& name, const String& version) @@ -397,8 +389,6 @@ private: , domain(domain) , name(name) , version(version) - , scriptContext(0) - , scriptObject(0) { } }; @@ -534,6 +524,7 @@ void InspectorController::search(Node* node, const String& target) { } #if ENABLE(DATABASE) +#if USE(JSC) static JSValueRef databaseTableNames(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { InspectorController* controller = reinterpret_cast<InspectorController*>(JSObjectGetPrivate(thisObject)); @@ -587,6 +578,9 @@ static JSValueRef databaseTableNames(JSContextRef ctx, JSObjectRef /*function*/, return result; } +#elif USE(V8) +// TODO(aa): Implement inspector database support +#endif #endif DOMWindow* InspectorController::inspectedWindow() { @@ -794,6 +788,11 @@ void InspectorController::enableTrackResources(bool trackResources) m_resources.clear(); } +void InspectorController::addDatabaseScriptResource(InspectorDatabaseResource*) +{ + // TODO(aa): Implement database support for inspector. +} + void InspectorController::addMessageToConsole(MessageSource source, MessageLevel level, ScriptCallContext* context) { if (!enabled()) @@ -1357,7 +1356,7 @@ void InspectorController::resetScriptObjects() DatabaseResourcesSet::iterator databasesEnd = m_databaseResources.end(); for (DatabaseResourcesSet::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it) { InspectorDatabaseResource* resource = (*it).get(); - resource->setScriptObject(0, 0); + resource->setScriptObject(); } #endif |