Title: [124627] trunk/Source/WebCore
Revision
124627
Author
[email protected]
Date
2012-08-03 10:45:09 -0700 (Fri, 03 Aug 2012)

Log Message

[V8] Remove v8StringToWebCoreString()
https://bugs.webkit.org/show_bug.cgi?id=93087

Reviewed by Adam Barth.

There should be only one API that converts V8 String
to WebCore String. v8ValueToWebCoreString() does it.
We can remove v8StringToWebCoreString().

No tests. No change in behavior.

* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setBreakpoint):
* bindings/v8/V8Binding.cpp:
(WebCore::v8ValueToWebCoreString):
* bindings/v8/V8Binding.h:
(WebCore):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124626 => 124627)


--- trunk/Source/WebCore/ChangeLog	2012-08-03 17:32:35 UTC (rev 124626)
+++ trunk/Source/WebCore/ChangeLog	2012-08-03 17:45:09 UTC (rev 124627)
@@ -1,3 +1,23 @@
+2012-08-03  Kentaro Hara  <[email protected]>
+
+        [V8] Remove v8StringToWebCoreString()
+        https://bugs.webkit.org/show_bug.cgi?id=93087
+
+        Reviewed by Adam Barth.
+
+        There should be only one API that converts V8 String
+        to WebCore String. v8ValueToWebCoreString() does it.
+        We can remove v8StringToWebCoreString().
+
+        No tests. No change in behavior.
+
+        * bindings/v8/ScriptDebugServer.cpp:
+        (WebCore::ScriptDebugServer::setBreakpoint):
+        * bindings/v8/V8Binding.cpp:
+        (WebCore::v8ValueToWebCoreString):
+        * bindings/v8/V8Binding.h:
+        (WebCore):
+
 2012-07-20  Jon Lee  <[email protected]>
 
         Crash in Notification when setting a non-object as an event listener (91881)

Modified: trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp (124626 => 124627)


--- trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp	2012-08-03 17:32:35 UTC (rev 124626)
+++ trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp	2012-08-03 17:45:09 UTC (rev 124627)
@@ -89,7 +89,7 @@
         return "";
     *actualLineNumber = args->Get(v8::String::New("lineNumber"))->Int32Value();
     *actualColumnNumber = args->Get(v8::String::New("columnNumber"))->Int32Value();
-    return v8StringToWebCoreString(breakpointId->ToString());
+    return v8ValueToWebCoreString(breakpointId->ToString());
 }
 
 void ScriptDebugServer::removeBreakpoint(const String& breakpointId)

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.cpp (124626 => 124627)


--- trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2012-08-03 17:32:35 UTC (rev 124626)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2012-08-03 17:45:09 UTC (rev 124627)
@@ -242,7 +242,7 @@
 String v8ValueToWebCoreString(v8::Handle<v8::Value> value)
 {
     if (value->IsString())
-        return v8StringToWebCoreString(v8::Handle<v8::String>::Cast(value));
+        return v8StringToWebCoreString<String>(v8::Handle<v8::String>::Cast(value), Externalize);
     return v8NonStringValueToWebCoreString(value);
 }
 

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (124626 => 124627)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-08-03 17:32:35 UTC (rev 124626)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-08-03 17:45:09 UTC (rev 124627)
@@ -283,15 +283,6 @@
         bool m_previous;
     };
 
-
-    enum ExternalMode {
-        Externalize,
-        DoNotExternalize
-    };
-
-    template <typename StringType>
-    StringType v8StringToWebCoreString(v8::Handle<v8::String> v8String, ExternalMode external);
-
     // Since v8::Null(isolate) crashes if we pass a null isolate,
     // we need to use v8NullWithCheck(isolate) if an isolate can be null.
     //
@@ -301,14 +292,18 @@
         return isolate ? v8::Null(isolate) : v8::Null();
     }
 
+    enum ExternalMode {
+        Externalize,
+        DoNotExternalize
+    };
+
+    template <typename StringType>
+    StringType v8StringToWebCoreString(v8::Handle<v8::String>, ExternalMode);
+
     // Convert v8 types to a WTF::String. If the V8 string is not already
     // an external string then it is transformed into an external string at this
     // point to avoid repeated conversions.
-    inline String v8StringToWebCoreString(v8::Handle<v8::String> v8String)
-    {
-        return v8StringToWebCoreString<String>(v8String, Externalize);
-    }
-    String v8ValueToWebCoreString(v8::Handle<v8::Value> value);
+    String v8ValueToWebCoreString(v8::Handle<v8::Value>);
 
     // Convert a V8 value to a WTF::AtomicString.
     AtomicString v8ValueToAtomicWebCoreString(v8::Handle<v8::Value>);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to