- Revision
- 144813
- Author
- jsb...@chromium.org
- Date
- 2013-03-05 13:48:34 -0800 (Tue, 05 Mar 2013)
Log Message
IndexedDB: Remove some unused binding code
https://bugs.webkit.org/show_bug.cgi?id=111463
Reviewed by Adam Barth.
IDBRequest got a custom V8 getter for |request| to help diagnose an issue, but the
root cause was found/fixed (http://wkbug.com/110916 and http://wkbug.com/110206) so
remove it. Also, IDBKey was marked ScriptWrappable but it is now explicitly converted
to a ScriptValue before it gets anywhere near the binding code, so remove that too.
Finally, createIDBKeyFromValue doesn't need to be exposed from IDBBindingUtilities.
No new tests - just removing dead code.
* Modules/indexeddb/IDBKey.h: No need for ScriptWrappable.
* Modules/indexeddb/IDBRequest.idl: Remove custom binding (root cause of bug found).
* WebCore.gypi: Ditto.
* bindings/js/IDBBindingUtilities.h: Don't expose internal createIDBKeyFromValue().
* bindings/v8/IDBBindingUtilities.h: Ditto.
* bindings/v8/custom/V8IDBRequestCustom.cpp: Removed.
Modified Paths
Removed Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (144812 => 144813)
--- trunk/Source/WebCore/ChangeLog 2013-03-05 21:47:30 UTC (rev 144812)
+++ trunk/Source/WebCore/ChangeLog 2013-03-05 21:48:34 UTC (rev 144813)
@@ -1,3 +1,25 @@
+2013-03-05 Joshua Bell <jsb...@chromium.org>
+
+ IndexedDB: Remove some unused binding code
+ https://bugs.webkit.org/show_bug.cgi?id=111463
+
+ Reviewed by Adam Barth.
+
+ IDBRequest got a custom V8 getter for |request| to help diagnose an issue, but the
+ root cause was found/fixed (http://wkbug.com/110916 and http://wkbug.com/110206) so
+ remove it. Also, IDBKey was marked ScriptWrappable but it is now explicitly converted
+ to a ScriptValue before it gets anywhere near the binding code, so remove that too.
+ Finally, createIDBKeyFromValue doesn't need to be exposed from IDBBindingUtilities.
+
+ No new tests - just removing dead code.
+
+ * Modules/indexeddb/IDBKey.h: No need for ScriptWrappable.
+ * Modules/indexeddb/IDBRequest.idl: Remove custom binding (root cause of bug found).
+ * WebCore.gypi: Ditto.
+ * bindings/js/IDBBindingUtilities.h: Don't expose internal createIDBKeyFromValue().
+ * bindings/v8/IDBBindingUtilities.h: Ditto.
+ * bindings/v8/custom/V8IDBRequestCustom.cpp: Removed.
+
2013-03-05 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r144798.
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.h (144812 => 144813)
--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.h 2013-03-05 21:47:30 UTC (rev 144812)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.h 2013-03-05 21:48:34 UTC (rev 144813)
@@ -28,7 +28,6 @@
#if ENABLE(INDEXED_DATABASE)
-#include "ScriptWrappable.h"
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
@@ -36,7 +35,7 @@
namespace WebCore {
-class IDBKey : public ScriptWrappable, public RefCounted<IDBKey> {
+class IDBKey : public RefCounted<IDBKey> {
public:
typedef Vector<RefPtr<IDBKey> > KeyArray;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl (144812 => 144813)
--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl 2013-03-05 21:47:30 UTC (rev 144812)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl 2013-03-05 21:48:34 UTC (rev 144813)
@@ -33,7 +33,7 @@
EventTarget,
JSNoStaticTables
] interface IDBRequest {
- [V8Custom] readonly attribute IDBAny result
+ readonly attribute IDBAny result
getter raises (DOMException);
readonly attribute DOMError error
getter raises (DOMException);
Modified: trunk/Source/WebCore/WebCore.gypi (144812 => 144813)
--- trunk/Source/WebCore/WebCore.gypi 2013-03-05 21:47:30 UTC (rev 144812)
+++ trunk/Source/WebCore/WebCore.gypi 2013-03-05 21:48:34 UTC (rev 144813)
@@ -1478,7 +1478,6 @@
'bindings/v8/custom/V8HTMLSelectElementCustom.h',
'bindings/v8/custom/V8HistoryCustom.cpp',
'bindings/v8/custom/V8IDBAnyCustom.cpp',
- 'bindings/v8/custom/V8IDBRequestCustom.cpp',
'bindings/v8/custom/V8ImageDataCustom.cpp',
'bindings/v8/custom/V8InjectedScriptHostCustom.cpp',
'bindings/v8/custom/V8InjectedScriptManager.cpp',
Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h (144812 => 144813)
--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h 2013-03-05 21:47:30 UTC (rev 144812)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h 2013-03-05 21:48:34 UTC (rev 144813)
@@ -39,8 +39,6 @@
class IDBKeyPath;
class SharedBuffer;
-PassRefPtr<IDBKey> createIDBKeyFromValue(JSC::ExecState*, JSC::JSValue);
-
IDBKeyPath idbKeyPathFromValue(JSC::ExecState*, JSC::JSValue);
bool injectIDBKeyIntoScriptValue(DOMRequestState*, PassRefPtr<IDBKey>, ScriptValue&, const IDBKeyPath&);
Modified: trunk/Source/WebCore/bindings/v8/IDBBindingUtilities.h (144812 => 144813)
--- trunk/Source/WebCore/bindings/v8/IDBBindingUtilities.h 2013-03-05 21:47:30 UTC (rev 144812)
+++ trunk/Source/WebCore/bindings/v8/IDBBindingUtilities.h 2013-03-05 21:48:34 UTC (rev 144813)
@@ -40,8 +40,6 @@
class SerializedScriptValue;
class SharedBuffer;
-PassRefPtr<IDBKey> createIDBKeyFromValue(v8::Handle<v8::Value>);
-
bool injectIDBKeyIntoScriptValue(DOMRequestState*, PassRefPtr<IDBKey>, ScriptValue&, const IDBKeyPath&);
PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(DOMRequestState*, const ScriptValue&, const IDBKeyPath&);
bool canInjectIDBKeyIntoScriptValue(DOMRequestState*, const ScriptValue&, const IDBKeyPath&);
Deleted: trunk/Source/WebCore/bindings/v8/custom/V8IDBRequestCustom.cpp (144812 => 144813)
--- trunk/Source/WebCore/bindings/v8/custom/V8IDBRequestCustom.cpp 2013-03-05 21:47:30 UTC (rev 144812)
+++ trunk/Source/WebCore/bindings/v8/custom/V8IDBRequestCustom.cpp 2013-03-05 21:48:34 UTC (rev 144813)
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#if ENABLE(INDEXED_DATABASE)
-#include "V8IDBRequest.h"
-
-#include "ExceptionCode.h"
-#include "V8Binding.h"
-#include "V8DOMWrapper.h"
-#include "V8IDBAny.h"
-
-namespace WebCore {
-
-// FIXME: Remove this custom binding implementation after gathering data for: http://wkbug.com/105363
-v8::Handle<v8::Value> V8IDBRequest::resultAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- IDBRequest* imp = V8IDBRequest::toNative(info.Holder());
- ExceptionCode ec = 0;
- RefPtr<IDBAny> v = imp->result(ec);
- if (UNLIKELY(ec))
- return setDOMException(ec, info.GetIsolate());
- RefPtr<IDBAny> result = imp->result(ec);
- v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper(result.get(), info.GetIsolate())) : v8Undefined();
- if (wrapper.IsEmpty()) {
- wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
- if (!wrapper.IsEmpty()) {
- // A flaky crash has been seen in the setNamedHiddenReference call but with no reliable repro.
- // Introduce an extra call to determine if the issue lies with the holder or with the wrapper.
- // http://wkbug.com/105363
- V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "dummyAttrForDebugging", v8::String::New("foo"));
- // Also verify that the string is sane.
- if (wrapper->IsString())
- ASSERT(wrapper->ToString()->Utf8Length() >= 0);
- V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "result", wrapper);
- }
- }
- return wrapper;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)