Title: [198852] trunk/Source/WebCore
Revision
198852
Author
beid...@apple.com
Date
2016-03-30 12:42:59 -0700 (Wed, 30 Mar 2016)

Log Message

Random SerializedScriptValue cleanup.
https://bugs.webkit.org/show_bug.cgi?id=156032

Rubberstamped by Tim Hatcher.

- Remove two unused functions.
- Make the class always be ThreadSafeRefCounted.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::numberValue): Deleted.
(WebCore::SerializedScriptValue::undefinedValue): Deleted.
* bindings/js/SerializedScriptValue.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (198851 => 198852)


--- trunk/Source/WebCore/ChangeLog	2016-03-30 19:36:20 UTC (rev 198851)
+++ trunk/Source/WebCore/ChangeLog	2016-03-30 19:42:59 UTC (rev 198852)
@@ -1,3 +1,18 @@
+2016-03-30  Brady Eidson  <beid...@apple.com>
+
+        Random SerializedScriptValue cleanup.
+        https://bugs.webkit.org/show_bug.cgi?id=156032
+
+        Rubberstamped by Tim Hatcher.
+
+        - Remove two unused functions.
+        - Make the class always be ThreadSafeRefCounted.
+
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::SerializedScriptValue::numberValue): Deleted.
+        (WebCore::SerializedScriptValue::undefinedValue): Deleted.
+        * bindings/js/SerializedScriptValue.h:
+
 2016-03-30  Brent Fulgham  <bfulg...@apple.com>
 
         Avoid WebCore-prefixed paths when building WebCore

Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (198851 => 198852)


--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2016-03-30 19:36:20 UTC (rev 198851)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2016-03-30 19:42:59 UTC (rev 198852)
@@ -2672,22 +2672,6 @@
     return adoptRef(*new SerializedScriptValue(WTFMove(buffer)));
 }
 
-#if ENABLE(INDEXED_DATABASE)
-Ref<SerializedScriptValue> SerializedScriptValue::numberValue(double value)
-{
-    Vector<uint8_t> buffer;
-    CloneSerializer::serializeNumber(value, buffer);
-    return adoptRef(*new SerializedScriptValue(WTFMove(buffer)));
-}
-
-Ref<SerializedScriptValue> SerializedScriptValue::undefinedValue()
-{
-    Vector<uint8_t> buffer;
-    CloneSerializer::serializeUndefined(buffer);
-    return adoptRef(*new SerializedScriptValue(WTFMove(buffer)));
-}
-#endif
-
 RefPtr<SerializedScriptValue> SerializedScriptValue::create(JSContextRef originContext, JSValueRef apiValue, JSValueRef* exception)
 {
     ExecState* exec = toJS(originContext);

Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.h (198851 => 198852)


--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.h	2016-03-30 19:36:20 UTC (rev 198851)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.h	2016-03-30 19:42:59 UTC (rev 198852)
@@ -59,12 +59,7 @@
 
 class SharedBuffer;
 
-class SerializedScriptValue :
-#if ENABLE(INDEXED_DATABASE)
-    public ThreadSafeRefCounted<SerializedScriptValue> {
-#else
-    public RefCounted<SerializedScriptValue> {
-#endif
+class SerializedScriptValue : public ThreadSafeRefCounted<SerializedScriptValue> {
 public:
     WEBCORE_EXPORT static RefPtr<SerializedScriptValue> create(JSC::ExecState*, JSC::JSValue, MessagePortArray*, ArrayBufferArray*, SerializationErrorMode = Throwing);
 
@@ -90,12 +85,6 @@
     bool hasBlobURLs() const { return !m_blobURLs.isEmpty(); }
     void blobURLs(Vector<String>&) const;
 
-#if ENABLE(INDEXED_DATABASE)
-    // FIXME: Get rid of these. The only caller immediately deserializes the result, so it's a very roundabout way to create a JSValue.
-    static Ref<SerializedScriptValue> numberValue(double value);
-    static Ref<SerializedScriptValue> undefinedValue();
-#endif
-
     static Ref<SerializedScriptValue> createFromWireBytes(Vector<uint8_t>&& data)
     {
         return adoptRef(*new SerializedScriptValue(WTFMove(data)));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to