[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

pfeldman at chromium.org pfeldman at chromium.org
Thu Oct 29 20:42:28 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 598f1d391bf3cf2521b69d42defb5a10ff6a6f2e
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 9 16:36:04 2009 +0000

    2009-10-09  Pavel Feldman  <pfeldman at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Web Inspector: Wrap Database into ScriptObject in v8 bindings.
    
            https://bugs.webkit.org/show_bug.cgi?id=30174
    
            No tests due to no Script* test infrastructure.
    
            * bindings/v8/ScriptObjectQuarantine.cpp:
            (WebCore::getQuarantinedScriptObject):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49393 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 333e81e..94e46da 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-09  Pavel Feldman  <pfeldman at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Web Inspector: Wrap Database into ScriptObject in v8 bindings.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30174
+
+        No tests due to no Script* test infrastructure.
+
+        * bindings/v8/ScriptObjectQuarantine.cpp:
+        (WebCore::getQuarantinedScriptObject):
+
 2009-10-09  Girish Ramakrishnan  <girish at forwardbias.in>
 
         Reviewed by Simon Hausmann.
diff --git a/WebCore/bindings/v8/ScriptObjectQuarantine.cpp b/WebCore/bindings/v8/ScriptObjectQuarantine.cpp
index 5dd0dc5..6528c9d 100644
--- a/WebCore/bindings/v8/ScriptObjectQuarantine.cpp
+++ b/WebCore/bindings/v8/ScriptObjectQuarantine.cpp
@@ -57,10 +57,25 @@ bool getQuarantinedScriptObject(Database* database, ScriptObject& quarantinedObj
 {
     ASSERT(database);
 
-    // FIXME: Implement when Database V8 bindings are enabled
+#if ENABLE(DATABASE)
+    v8::HandleScope handleScope;
+    Frame* frame = database->document()->frame();
+    if (!frame)
+        return false;
+
+    v8::Local<v8::Context> context = V8Proxy::context(frame);
+    if (context.IsEmpty())
+        return false;
+
+    v8::Context::Scope scope(context);
+    v8::Handle<v8::Value> v8Database = V8DOMWrapper::convertToV8Object(V8ClassIndex::DATABASE, database);
+    ScriptState* scriptState = frame->page()->inspectorController()->frontendScriptState();
+    quarantinedObject = ScriptObject(scriptState, v8::Local<v8::Object>(v8::Object::Cast(*v8Database)));
+#else
     ASSERT_NOT_REACHED();
     quarantinedObject = ScriptObject();
-    return false;
+#endif
+    return true;
 }
 
 bool getQuarantinedScriptObject(Storage* storage, ScriptObject& quarantinedObject)
@@ -72,7 +87,9 @@ bool getQuarantinedScriptObject(Storage* storage, ScriptObject& quarantinedObjec
 #if ENABLE(DOM_STORAGE)
     v8::HandleScope handleScope;
     v8::Local<v8::Context> context = V8Proxy::context(frame);
-    // FIXME: What if context.IsEmpty()?
+    if (context.IsEmpty())
+        return false;
+
     v8::Context::Scope scope(context);
 
     v8::Handle<v8::Value> v8Storage = V8DOMWrapper::convertToV8Object(V8ClassIndex::STORAGE, storage);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list