Title: [110369] trunk/Source/WebCore
- Revision
- 110369
- Author
- [email protected]
- Date
- 2012-03-09 21:04:55 -0800 (Fri, 09 Mar 2012)
Log Message
[V8] Fix a fixme in v8 bindings
https://bugs.webkit.org/show_bug.cgi?id=80734
Reviewed by Kentaro Hara.
No new tests. Covered by existing tests.
* bindings/v8/V8Binding.cpp:
(WebCore::toInt32):
(WebCore::toUInt32):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (110368 => 110369)
--- trunk/Source/WebCore/ChangeLog 2012-03-10 04:50:20 UTC (rev 110368)
+++ trunk/Source/WebCore/ChangeLog 2012-03-10 05:04:55 UTC (rev 110369)
@@ -1,3 +1,16 @@
+2012-03-09 Erik Arvidsson <[email protected]>
+
+ [V8] Fix a fixme in v8 bindings
+ https://bugs.webkit.org/show_bug.cgi?id=80734
+
+ Reviewed by Kentaro Hara.
+
+ No new tests. Covered by existing tests.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::toInt32):
+ (WebCore::toUInt32):
+
2012-03-09 Lauro Neto <[email protected]>
[Qt] WebCore/Target.pri contains obsolete FileStreamProxy.h reference.
Modified: trunk/Source/WebCore/bindings/v8/V8Binding.cpp (110368 => 110369)
--- trunk/Source/WebCore/bindings/v8/V8Binding.cpp 2012-03-10 04:50:20 UTC (rev 110368)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.cpp 2012-03-10 05:04:55 UTC (rev 110369)
@@ -210,7 +210,7 @@
{
ok = true;
- // Fast case. The value is already a 32-bit integer.
+ // Fast case. The value is already a 32-bit integer.
if (value->IsInt32())
return value->Int32Value();
@@ -243,11 +243,10 @@
{
ok = true;
- // FIXME: there is currently no Value::IsUint32(). This code does
- // some contortions to avoid silently converting out-of-range
- // values to uint32_t.
+ // Fast case. The value is already a 32-bit unsigned integer.
+ if (value->IsUint32())
+ return value->Uint32Value();
- // Fast case. The value is already a 32-bit positive integer.
if (value->IsInt32()) {
int32_t result = value->Int32Value();
if (result >= 0)
@@ -275,15 +274,7 @@
return 0;
}
- // FIXME: v8::Uint32::Value is not defined!
- // http://code.google.com/p/v8/issues/detail?id=624
- v8::Local<v8::Int32> intValue = value->ToInt32();
- if (intValue.IsEmpty()) {
- ok = false;
- return 0;
- }
-
- return static_cast<uint32_t>(intValue->Value());
+ return uintValue->Value();
}
template <class S> struct StringTraits
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes