<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>117593</bug_id>
          
          <creation_ts>2013-06-13 08:00:33 -0700</creation_ts>
          <short_desc>Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings</short_desc>
          <delta_ts>2013-06-13 09:13:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Bindings</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Dumez">cdumez</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>ggaren</cc>
    
    <cc>laszlo.gombos</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>900033</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2013-06-13 08:00:33 -0700</bug_when>
    <thetext>In JSDOMBindings.cpp, the following pattern is used several times:
if (value.isInt32())
    return value.toInt32(exec);

This would be more efficiently written as:
if (value.isInt32())
    return value.asInt32();

The issue is that JSValue::toInt32() also calls value.isInt32() internally as well and returns value.asInt32() if it is.
We should therefore call asInt32() directly since we already know the value is an int32.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900039</commentid>
    <comment_count>1</comment_count>
      <attachid>204587</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2013-06-13 08:15:30 -0700</bug_when>
    <thetext>Created attachment 204587
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900043</commentid>
    <comment_count>2</comment_count>
      <attachid>204587</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-06-13 08:26:47 -0700</bug_when>
    <thetext>Comment on attachment 204587
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900118</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-06-13 09:11:46 -0700</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 204587:

platform/mac/fonts/han-disunification.html bug 114207 (author: ap@webkit.org)
platform/mac/editing/deleting/deletionUI-single-instance.html bug 114181 (author: rniwa@webkit.org)
transitions/color-transition-rounding.html bug 114182 (author: simon.fraser@apple.com)
transitions/cubic-bezier-overflow-svg-length.html bug 114183 (author: peter@chromium.org)
transitions/interrupt-zero-duration.html bug 114184 (authors: cmarrin@apple.com, rniwa@webkit.org, and simon.fraser@apple.com)
transitions/multiple-background-transitions.html bug 114185 (author: simon.fraser@apple.com)
transitions/cubic-bezier-overflow-color.html bug 114186 (author: peter@chromium.org)
transitions/multiple-shadow-transitions.html bug 114187 (author: simon.fraser@apple.com)
transitions/mismatched-shadow-transitions.html bug 114188 (author: simon.fraser@apple.com)
transitions/color-transition-all.html bug 114189 (authors: ossy@webkit.org and simon.fraser@apple.com)
transitions/cubic-bezier-overflow-shadow.html bug 114191 (author: peter@chromium.org)
transitions/min-max-width-height-transitions.html bug 114192 (author: simon.fraser@apple.com)
transitions/cancel-transition.html bug 114193 (authors: ojan@chromium.org, rniwa@webkit.org, and simon.fraser@apple.com)
transitions/border-radius-transition.html bug 114194 (author: simon.fraser@apple.com)
transitions/flex-transitions.html bug 114195 (author: tony@chromium.org)
transitions/mixed-type.html bug 114196 (author: mikelawther@chromium.org)
transitions/multiple-mask-transitions.html bug 114197 (author: simon.fraser@apple.com)
transitions/color-transition-premultiplied.html bug 114198 (author: simon.fraser@apple.com)
transitions/mismatched-shadow-styles.html bug 114199 (author: simon.fraser@apple.com)
transitions/mask-transitions.html bug 114200 (authors: ojan@chromium.org, oliver@apple.com, and simon.fraser@apple.com)
transitions/cubic-bezier-overflow-length.html bug 114201 (author: peter@chromium.org)
transitions/multiple-background-size-transitions.html bug 114202 (authors: mitz@webkit.org and simon.fraser@apple.com)
transitions/clip-transition.html bug 114203 (authors: dglazkov@chromium.org, krit@webkit.org, and simon.fraser@apple.com)
transitions/cubic-bezier-overflow-transform.html bug 114204 (author: peter@chromium.org)
transitions/interrupted-accelerated-transition.html bug 56242 (authors: rniwa@webkit.org, simon.fraser@apple.com, and tonyg@chromium.org)
transitions/background-transitions.html bug 114206 (author: simon.fraser@apple.com)
http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html bug 114208 (authors: abarth@webkit.org and rniwa@webkit.org)
fast/repaint/table-cell-collapsed-border-scroll.html bug 117529 (author: robert@webkit.org)
fast/loader/javascript-url-in-object.html bug 114210 (authors: rniwa@webkit.org and sam@webkit.org)
compositing/reflections/load-video-in-reflection.html bug 117427 (authors: mihaip@chromium.org, rniwa@webkit.org, and simon.fraser@apple.com)
The commit-queue is continuing to process your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900120</commentid>
    <comment_count>4</comment_count>
      <attachid>204587</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-06-13 09:13:05 -0700</bug_when>
    <thetext>Comment on attachment 204587
Patch

Clearing flags on attachment: 204587

Committed r151550: &lt;http://trac.webkit.org/changeset/151550&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900121</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-06-13 09:13:16 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>204587</attachid>
            <date>2013-06-13 08:15:30 -0700</date>
            <delta_ts>2013-06-13 09:13:04 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>117593_asInt32.patch</filename>
            <type>text/plain</type>
            <size>2412</size>
            <attacher name="Chris Dumez">cdumez</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBjYWZhOTYyLi5jM2ZmNjczIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTgg
QEAKKzIwMTMtMDYtMTMgIENocmlzdG9waGUgRHVtZXogIDxjaC5kdW1lekBzaXNhLnNhbXN1bmcu
Y29tPgorCisgICAgICAgIEF2b2lkIGR1cGxpY2F0ZSBpc0ludDMyKCkgLyBpc1VJbnQzMigpIGNo
ZWNrcyBpbiBKU0RPTUJpbmRpbmdzCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3No
b3dfYnVnLmNnaT9pZD0xMTc1OTMKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMh
KS4KKworICAgICAgICBBdm9pZCBkdXBsaWNhdGUgaXNJbnQzMigpIC8gaXNVSW50MzIoKSBjaGVj
a3MgaW4gSlNET01CaW5kaW5ncyBieQorICAgICAgICBjYWxsaW5nIGFzSW50MzIoKSAvIGFzVUlu
dDMyKCkgaW5zdGVhZCBvZiB0b0ludDMyKCkgLyB0b1VJbnQzMigpCisgICAgICAgIHdoZW4gd2Ug
YWxyZWFkeSBrbm93IHRoZSB2YWx1ZSBpcyBhIGludDMyIC8gdW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