summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authorkasperl@google.com <kasperl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 11:51:16 +0000
committerkasperl@google.com <kasperl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 11:51:16 +0000
commitc6b19dbb075ea569f16b6d8675e36eeb9eacd20f (patch)
tree99afabffbda78fbadcd1ee6b4cd08d6be82c8fc6 /webkit/port
parent983a65fc41ab69b061c4e497f68ce706b67894d8 (diff)
downloadchromium_src-c6b19dbb075ea569f16b6d8675e36eeb9eacd20f.zip
chromium_src-c6b19dbb075ea569f16b6d8675e36eeb9eacd20f.tar.gz
chromium_src-c6b19dbb075ea569f16b6d8675e36eeb9eacd20f.tar.bz2
Re-introduce check for empty handles after calling toString when
converting a JavaScript object to a WebCore string. BUG=none TEST=none Review URL: http://codereview.chromium.org/115771 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/bindings/v8/v8_binding.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/port/bindings/v8/v8_binding.cpp b/webkit/port/bindings/v8/v8_binding.cpp
index 831ca74..616d7b2 100644
--- a/webkit/port/bindings/v8/v8_binding.cpp
+++ b/webkit/port/bindings/v8/v8_binding.cpp
@@ -94,6 +94,10 @@ String v8ValueToWebCoreString(v8::Handle<v8::Value> obj) {
} else {
v8::TryCatch block;
v8::Handle<v8::String> v8_str = obj->ToString();
+ // Check for empty handles to handle the case where an exception
+ // is thrown as part of invoking toString on the object.
+ if (v8_str.IsEmpty())
+ return StringImpl::empty();
return v8StringToWebCoreString(v8_str, false);
}
}