Title: [151550] trunk/Source/WebCore
- Revision
- 151550
- Author
- [email protected]
- Date
- 2013-06-13 09:12:51 -0700 (Thu, 13 Jun 2013)
Log Message
Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings
https://bugs.webkit.org/show_bug.cgi?id=117593
Reviewed by Geoffrey Garen.
Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings by
calling asInt32() / asUInt32() instead of toInt32() / toUInt32()
when we already know the value is a int32 / uint32.
No new tests, no behavior change.
* bindings/js/JSDOMBinding.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (151549 => 151550)
--- trunk/Source/WebCore/ChangeLog 2013-06-13 15:37:10 UTC (rev 151549)
+++ trunk/Source/WebCore/ChangeLog 2013-06-13 16:12:51 UTC (rev 151550)
@@ -1,3 +1,18 @@
+2013-06-13 Christophe Dumez <[email protected]>
+
+ Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings
+ https://bugs.webkit.org/show_bug.cgi?id=117593
+
+ Reviewed by Geoffrey Garen.
+
+ Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings by
+ calling asInt32() / asUInt32() instead of toInt32() / toUInt32()
+ when we already know the value is a int32 / uint32.
+
+ No new tests, no behavior change.
+
+ * bindings/js/JSDOMBinding.cpp:
+
2013-06-13 Yuki Sekiguchi <[email protected]>
Setting overflow:hidden on position:absolute does not repaint hidden content
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (151549 => 151550)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2013-06-13 15:37:10 UTC (rev 151549)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2013-06-13 16:12:51 UTC (rev 151550)
@@ -309,7 +309,7 @@
int32_t toInt32EnforceRange(ExecState* exec, JSValue value)
{
if (value.isInt32())
- return value.toInt32(exec);
+ return value.asInt32();
double x = value.toNumber(exec);
if (exec->hadException())
@@ -321,7 +321,7 @@
uint32_t toUInt32EnforceRange(ExecState* exec, JSValue value)
{
if (value.isUInt32())
- return value.toUInt32(exec);
+ return value.asUInt32();
double x = value.toNumber(exec);
if (exec->hadException())
@@ -333,7 +333,7 @@
int64_t toInt64(ExecState* exec, JSValue value, IntegerConversionConfiguration configuration)
{
if (value.isInt32())
- return value.toInt32(exec);
+ return value.asInt32();
double x = value.toNumber(exec);
if (exec->hadException())
@@ -352,7 +352,7 @@
uint64_t toUInt64(ExecState* exec, JSValue value, IntegerConversionConfiguration configuration)
{
if (value.isUInt32())
- return value.toUInt32(exec);
+ return value.asUInt32();
double x = value.toNumber(exec);
if (exec->hadException())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes