2009-09-22 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2009 14:42:52 +0000 (14:42 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2009 14:42:52 +0000 (14:42 +0000)
        Unreviewed.

        Fix bogus build fix I did last night.

        * bindings/v8/custom/V8DOMWindowCustom.cpp:
        (WebCore::V8Custom::WindowSetTimeoutImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@48635 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp

index 941e0891a0577220b08df8735a371cd3a930ef4c..26fb7faa0436887008cab150a96d4105c1d46da7 100644 (file)
@@ -1,3 +1,12 @@
+2009-09-22  Adam Barth  <abarth@webkit.org>
+
+        Unreviewed.
+
+        Fix bogus build fix I did last night.
+
+        * bindings/v8/custom/V8DOMWindowCustom.cpp:
+        (WebCore::V8Custom::WindowSetTimeoutImpl):
+
 2009-09-22  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
         Reviewed by Simon Hausmann.
index 84ddb913e858cd8860f5bd015059fea743af350c..ff45d6e43ea06f1b6473ab8bfd95b830d2c3c910 100644 (file)
@@ -69,8 +69,17 @@ v8::Handle<v8::Value> V8Custom::WindowSetTimeoutImpl(const v8::Arguments& args,
 
     WebCore::String functionString;
     if (!function->IsFunction()) {
-        functionString = function->IsString() ? 
-            toWebCoreString(function) : toWebCoreString(function->ToString());
+        if (function->IsString())
+            functionString = toWebCoreString(function);
+        else {
+            v8::Handle<v8::Value> v8String = function->ToString();
+
+            // Bail out if string conversion failed. 
+            if (v8String.IsEmpty()) 
+                return v8::Undefined(); 
+
+            functionString = toWebCoreString(v8String);
+        }
 
         // Don't allow setting timeouts to run empty functions!
         // (Bug 1009597)