<?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>163182</bug_id>
          
          <creation_ts>2016-10-09 10:26:48 -0700</creation_ts>
          <short_desc>ValueAdd should be constant folded if the operands are constant String,Primitive or Primitive,String</short_desc>
          <delta_ts>2016-10-16 19:11:52 -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>JavaScriptCore</component>
          <version>WebKit 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="Saam Barati">saam</reporter>
          <assigned_to name="Saam Barati">saam</assigned_to>
          <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>rniwa</cc>
    
    <cc>youennf</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1238089</commentid>
    <comment_count>0</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-10-09 10:26:48 -0700</bug_when>
    <thetext>This comes up in Dromaeo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238144</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2016-10-09 17:41:42 -0700</bug_when>
    <thetext>NICE!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238316</commentid>
    <comment_count>2</comment_count>
      <attachid>291110</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-10-10 08:56:39 -0700</bug_when>
    <thetext>Created attachment 291110
WIP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238324</commentid>
    <comment_count>3</comment_count>
      <attachid>291112</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-10-10 09:12:59 -0700</bug_when>
    <thetext>Created attachment 291112
WIP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238697</commentid>
    <comment_count>4</comment_count>
      <attachid>291215</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-10-10 19:42:34 -0700</bug_when>
    <thetext>Created attachment 291215
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238771</commentid>
    <comment_count>5</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-10-10 23:49:46 -0700</bug_when>
    <thetext>Two Dromaeo runs of relevant tests both with patched and non-patched JSC. Looks good.

Pactched version:
1.
element.expando = value:Runs -&gt; [15259, 15286, 15789, 15963, 16001] runs/s
    mean: 15659.6 runs/s
    median: 15789 runs/s
    stdev: 362.42488877007344 runs/s
    min: 15259 runs/s
    max: 16001 runs/s

element.expando:Runs -&gt; [177329, 293077, 294280, 294527, 295861] runs/s
    mean: 271014.8 runs/s
    median: 294280 runs/s
    stdev: 52381.28607814054 runs/s
    min: 177329 runs/s
    max: 295861 runs/s


:Runs -&gt; [14050.009403493468, 14528.250866673368, 14985.00953013684, 15142.30571354955, 15180.021487067997] runs/s
    mean: 14777.119400184245 runs/s
    median: 14985.00953013684 runs/s
    stdev: 482.0617013090354 runs/s
    min: 14050.009403493468 runs/s
    max: 15180.021487067997 runs/s


2.
element.expando = value:Runs -&gt; [15324, 15624, 15644, 15783, 15821] runs/s
    mean: 15639.2 runs/s
    median: 15644 runs/s
    stdev: 195.7899384544569 runs/s
    min: 15324 runs/s
    max: 15821 runs/s

element.expando:Runs -&gt; [171449, 291956, 292678, 292877, 294543] runs/s
    mean: 268700.6 runs/s
    median: 292678 runs/s
    stdev: 54373.54825004526 runs/s
    min: 171449 runs/s
    max: 294543 runs/s


:Runs -&gt; [14066.72525472097, 14830.354847519346, 14850.23654491084, 14975.953123177605, 15014.514579654855] runs/s
    mean: 14747.556869996724 runs/s
    median: 14850.23654491084 runs/s
    stdev: 388.7034783399407 runs/s
    min: 14066.72525472097 runs/s
    max: 15014.514579654855 runs/s



Unpatched version:
1.
element.expando = value:Runs -&gt; [780.2197802197802, 797, 800, 802, 805] runs/s
    mean: 796.843956043956 runs/s
    median: 800 runs/s
    stdev: 9.739789875703048 runs/s
    min: 780.2197802197802 runs/s
    max: 805 runs/s

element.expando:Runs -&gt; [1010, 1014, 1015, 1019, 1019] runs/s
    mean: 1015.4 runs/s
    median: 1015 runs/s
    stdev: 3.781534080237811 runs/s
    min: 1010 runs/s
    max: 1019 runs/s


:Runs -&gt; [440.18169541464613, 446.24958586416346, 447.3829201101929, 448.78528281164193, 449.7231359649123] runs/s
    mean: 446.46452403311133 runs/s
    median: 447.3829201101929 runs/s
    stdev: 3.753933212314692 runs/s
    min: 440.18169541464613 runs/s
    max: 449.7231359649123 runs/s

2.
element.expando = value:Runs -&gt; [763, 791, 793, 793.2067932067932, 797] runs/s
    mean: 787.4413586413586 runs/s
    median: 793 runs/s
    stdev: 13.83428977812362 runs/s
    min: 763 runs/s
    max: 797 runs/s

element.expando:Runs -&gt; [1001, 1007, 1008, 1008, 1013] runs/s
    mean: 1007.4 runs/s
    median: 1008 runs/s
    stdev: 4.277849927241485 runs/s
    min: 1001 runs/s
    max: 1013 runs/s


:Runs -&gt; [432.97222222222223, 443.01279199110115, 443.83342587451415, 443.8981967911402, 446.05580110497243] runs/s
    mean: 441.95448759679005 runs/s
    median: 443.83342587451415 runs/s
    stdev: 5.146121996860227 runs/s
    min: 432.97222222222223 runs/s
    max: 446.05580110497243 runs/s</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238779</commentid>
    <comment_count>6</comment_count>
      <attachid>291215</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-10-11 00:30:43 -0700</bug_when>
    <thetext>Comment on attachment 291215
patch

Clearing flags on attachment: 291215

Committed r207060: &lt;http://trac.webkit.org/changeset/207060&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238780</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-10-11 00:30:48 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238799</commentid>
    <comment_count>8</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-10-11 03:17:39 -0700</bug_when>
    <thetext>Reopening to attach new patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238800</commentid>
    <comment_count>9</comment_count>
      <attachid>291245</attachid>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-10-11 03:17:45 -0700</bug_when>
    <thetext>Created attachment 291245
Patch for landing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238801</commentid>
    <comment_count>10</comment_count>
      <attachid>291245</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-10-11 03:18:37 -0700</bug_when>
    <thetext>Comment on attachment 291245
Patch for landing

Rejecting attachment 291245 from commit-queue.

Failed to run &quot;[&apos;/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch&apos;, &apos;--status-host=webkit-queues.webkit.org&apos;, &apos;--bot-id=webkit-cq-02&apos;, &apos;apply-attachment&apos;, &apos;--no-update&apos;, &apos;--non-interactive&apos;, 291245, &apos;--port=mac&apos;]&quot; exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
/show_bug.cgi?id=163182&amp;ctype=xml&amp;excludefield=attachmentdata
Processing 1 patch from 1 bug.
Processing patch 291245 from bug 163182.
Failed to run &quot;[u&apos;/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply&apos;, &apos;--force&apos;]&quot; exit_code: 255 cwd: /Volumes/Data/EWS/WebKit

No diff found. at /Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply line 128.
Parsed 0 diffs from patch file(s).

Failed to run &quot;[u&apos;/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply&apos;, &apos;--force&apos;]&quot; exit_code: 255 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/2261477</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1238802</commentid>
    <comment_count>11</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-10-11 03:20:02 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; Comment on attachment 291245 [details]
&gt; Patch for landing

Wrong bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1240738</commentid>
    <comment_count>12</comment_count>
      <attachid>291215</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2016-10-16 11:09:57 -0700</bug_when>
    <thetext>Comment on attachment 291215
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291215&amp;action=review

&gt; Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:345
&gt; +                    if (!value)
&gt; +                        return String();
&gt; +                    if (value.isInt32())
&gt; +                        return String::number(value.asInt32());
&gt; +                    if (value.isNumber())
&gt; +                        return String::numberToStringECMAScript(value.asNumber());
&gt; +                    if (value.isBoolean())
&gt; +                        return value.asBoolean() ? ASCIILiteral(&quot;true&quot;) : ASCIILiteral(&quot;false&quot;);
&gt; +                    if (value.isNull())
&gt; +                        return ASCIILiteral(&quot;null&quot;);
&gt; +                    if (value.isUndefined())
&gt; +                        return ASCIILiteral(&quot;undefined&quot;);

This seems so repetitive with code in the JSValue class. Is there some way to share more of this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1240751</commentid>
    <comment_count>13</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2016-10-16 11:37:23 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; Comment on attachment 291215 [details]
&gt; patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=291215&amp;action=review
&gt; 
&gt; &gt; Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:345
&gt; &gt; +                    if (!value)
&gt; &gt; +                        return String();
&gt; &gt; +                    if (value.isInt32())
&gt; &gt; +                        return String::number(value.asInt32());
&gt; &gt; +                    if (value.isNumber())
&gt; &gt; +                        return String::numberToStringECMAScript(value.asNumber());
&gt; &gt; +                    if (value.isBoolean())
&gt; &gt; +                        return value.asBoolean() ? ASCIILiteral(&quot;true&quot;) : ASCIILiteral(&quot;false&quot;);
&gt; &gt; +                    if (value.isNull())
&gt; &gt; +                        return ASCIILiteral(&quot;null&quot;);
&gt; &gt; +                    if (value.isUndefined())
&gt; &gt; +                        return ASCIILiteral(&quot;undefined&quot;);
&gt; 
&gt; This seems so repetitive with code in the JSValue class. Is there some way
&gt; to share more of this?

The cost of sharing is probably greater than the benefit.

This code is subtly different.  The JSValue code uses VM number string caches, which the JIT can&apos;t do.  The JIT gives up for effects while JSValue executes them.  It&apos;s repetitive in structure, but if you tried to build an abstraction that deduplicates the code then your abstraction is likely to be about the same amount of code than writing this twice.

We often have repetitive code like this in the JIT.  I think that it&apos;s served us well because the worst case is that the JIT constant folds according to wrong rules.  The worst case if you share code is that the shared code goes down a path that isn&apos;t legal in the JIT, like accessing some VM state that isn&apos;t protected by locks.  Constant folding rules are trivial to write tests for, so we&apos;re more paranoid about the races.

Finally, I think that this duplication is mostly harmless because it&apos;s just a statement of core JSC semantics.  Duplication sucks most if you want to change the duplicated code later.  But the stringification rules of these types can&apos;t be changed without breaking the web.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1240813</commentid>
    <comment_count>14</comment_count>
      <attachid>291215</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2016-10-16 17:01:32 -0700</bug_when>
    <thetext>Comment on attachment 291215
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291215&amp;action=review

&gt;&gt;&gt; Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:345
&gt;&gt;&gt; +                        return ASCIILiteral(&quot;undefined&quot;);
&gt;&gt; 
&gt;&gt; This seems so repetitive with code in the JSValue class. Is there some way to share more of this?
&gt; 
&gt; The cost of sharing is probably greater than the benefit.
&gt; 
&gt; This code is subtly different.  The JSValue code uses VM number string caches, which the JIT can&apos;t do.  The JIT gives up for effects while JSValue executes them.  It&apos;s repetitive in structure, but if you tried to build an abstraction that deduplicates the code then your abstraction is likely to be about the same amount of code than writing this twice.
&gt; 
&gt; We often have repetitive code like this in the JIT.  I think that it&apos;s served us well because the worst case is that the JIT constant folds according to wrong rules.  The worst case if you share code is that the shared code goes down a path that isn&apos;t legal in the JIT, like accessing some VM state that isn&apos;t protected by locks.  Constant folding rules are trivial to write tests for, so we&apos;re more paranoid about the races.
&gt; 
&gt; Finally, I think that this duplication is mostly harmless because it&apos;s just a statement of core JSC semantics.  Duplication sucks most if you want to change the duplicated code later.  But the stringification rules of these types can&apos;t be changed without breaking the web.

Not surprising that the one used in actual runtime has some optimizations like that. I should have looked; I see now that there isn’t really good code to share with.

I wasn&apos;t suggesting we build try to build a significant new abstraction, so that’s a bit of a straw man.

I think my concern grew out of worries that this code might have used the wrong function, say String::number instead of String::numberToStringECMAScript, and it was likely we would not cover that in testing. I think we may need a couple more test cases for floating point that were included in the original patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1240820</commentid>
    <comment_count>15</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2016-10-16 17:19:54 -0700</bug_when>
    <thetext>(In reply to comment #14)
&gt; Comment on attachment 291215 [details]
&gt; patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=291215&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:345
&gt; &gt;&gt;&gt; +                        return ASCIILiteral(&quot;undefined&quot;);
&gt; &gt;&gt; 
&gt; &gt;&gt; This seems so repetitive with code in the JSValue class. Is there some way to share more of this?
&gt; &gt; 
&gt; &gt; The cost of sharing is probably greater than the benefit.
&gt; &gt; 
&gt; &gt; This code is subtly different.  The JSValue code uses VM number string caches, which the JIT can&apos;t do.  The JIT gives up for effects while JSValue executes them.  It&apos;s repetitive in structure, but if you tried to build an abstraction that deduplicates the code then your abstraction is likely to be about the same amount of code than writing this twice.
&gt; &gt; 
&gt; &gt; We often have repetitive code like this in the JIT.  I think that it&apos;s served us well because the worst case is that the JIT constant folds according to wrong rules.  The worst case if you share code is that the shared code goes down a path that isn&apos;t legal in the JIT, like accessing some VM state that isn&apos;t protected by locks.  Constant folding rules are trivial to write tests for, so we&apos;re more paranoid about the races.
&gt; &gt; 
&gt; &gt; Finally, I think that this duplication is mostly harmless because it&apos;s just a statement of core JSC semantics.  Duplication sucks most if you want to change the duplicated code later.  But the stringification rules of these types can&apos;t be changed without breaking the web.
&gt; 
&gt; Not surprising that the one used in actual runtime has some optimizations
&gt; like that. I should have looked; I see now that there isn’t really good code
&gt; to share with.
&gt; 
&gt; I wasn&apos;t suggesting we build try to build a significant new abstraction, so
&gt; that’s a bit of a straw man.

FWIW, we build such abstractions when we find that the code saved is bigger than the size of the abstraction.  Refactoring Yarr to be completely thread-safe so that the JIT can run it to constant-folding regular expression operations is one extreme example.  So, I didn&apos;t mean it as a straw man.  It probably would have been worth it if we were only abstracting whether to call the effectful slow path.

&gt; 
&gt; I think my concern grew out of worries that this code might have used the
&gt; wrong function, say String::number instead of
&gt; String::numberToStringECMAScript, and it was likely we would not cover that
&gt; in testing. I think we may need a couple more test cases for floating point
&gt; that were included in the original patch.

Isn&apos;t String::numberToStringECMAScript already the abstraction of how you convert non-int numbers to strings?

String::number is safe for int32&apos;s, in the sense that the rest of the VM also already assumes that this is a valid int32-&gt;string conversion according to ES.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1240844</commentid>
    <comment_count>16</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-10-16 19:10:05 -0700</bug_when>
    <thetext>(In reply to comment #14)
&gt; Comment on attachment 291215 [details]
&gt; patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=291215&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:345
&gt; &gt;&gt;&gt; +                        return ASCIILiteral(&quot;undefined&quot;);
&gt; &gt;&gt; 
&gt; &gt;&gt; This seems so repetitive with code in the JSValue class. Is there some way to share more of this?
&gt; &gt; 
&gt; &gt; The cost of sharing is probably greater than the benefit.
&gt; &gt; 
&gt; &gt; This code is subtly different.  The JSValue code uses VM number string caches, which the JIT can&apos;t do.  The JIT gives up for effects while JSValue executes them.  It&apos;s repetitive in structure, but if you tried to build an abstraction that deduplicates the code then your abstraction is likely to be about the same amount of code than writing this twice.
&gt; &gt; 
&gt; &gt; We often have repetitive code like this in the JIT.  I think that it&apos;s served us well because the worst case is that the JIT constant folds according to wrong rules.  The worst case if you share code is that the shared code goes down a path that isn&apos;t legal in the JIT, like accessing some VM state that isn&apos;t protected by locks.  Constant folding rules are trivial to write tests for, so we&apos;re more paranoid about the races.
&gt; &gt; 
&gt; &gt; Finally, I think that this duplication is mostly harmless because it&apos;s just a statement of core JSC semantics.  Duplication sucks most if you want to change the duplicated code later.  But the stringification rules of these types can&apos;t be changed without breaking the web.
&gt; 
&gt; Not surprising that the one used in actual runtime has some optimizations
&gt; like that. I should have looked; I see now that there isn’t really good code
&gt; to share with.
&gt; 
&gt; I wasn&apos;t suggesting we build try to build a significant new abstraction, so
&gt; that’s a bit of a straw man.
&gt; 
&gt; I think my concern grew out of worries that this code might have used the
&gt; wrong function, say String::number instead of
&gt; String::numberToStringECMAScript, and it was likely we would not cover that
&gt; in testing. I think we may need a couple more test cases for floating point
&gt; that were included in the original patch.
I agree that it&apos;s worth adding more floating point tests to prevent regressions in the future. An early version of my patch had a FIXME for the double case because I was tempted to use String::number but was suspicious of its correctness (this is before I looked at what the runtime version did). So I can see how this code could go wrong. I&apos;ll do the tests in a follow up patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1240846</commentid>
    <comment_count>17</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-10-16 19:11:52 -0700</bug_when>
    <thetext>Bug for tests:
https://bugs.webkit.org/show_bug.cgi?id=163517</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>291110</attachid>
            <date>2016-10-10 08:56:39 -0700</date>
            <delta_ts>2016-10-10 09:12:59 -0700</delta_ts>
            <desc>WIP</desc>
            <filename>b-backup.diff</filename>
            <type>text/plain</type>
            <size>4055</size>
            <attacher name="Saam Barati">saam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9kZmcvREZHQnl0ZUNvZGVQYXJzZXIuY3BwCj09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT0KLS0tIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9kZmcvREZHQnl0ZUNvZGVQYXJzZXIu
Y3BwCShyZXZpc2lvbiAyMDY5NjkpCisrKyBTb3VyY2UvSmF2YVNjcmlwdENvcmUvZGZnL0RGR0J5
dGVDb2RlUGFyc2VyLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNDIzOSw3ICs0MjM5LDEyIEBAIGJv
b2wgQnl0ZUNvZGVQYXJzZXI6OnBhcnNlQmxvY2sodW5zaWduZWQKICAgICAgICAgICAgICAgICBC
eVZhbEluZm8qIGJ5VmFsSW5mbyA9IG1faW5saW5lU3RhY2tUb3AtPm1fY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WYgKG1fbm9kZS0+Y2hpbGQxKCktPmlzQ29u
c3RhbnQoKSAmJiBtX25vZGUtPmNoaWxkMigpLT5pc0NvbnN0YW50KCkgJiYgKCEhbV9ub2RlLT5j
aGlsZDEoKS0+dHJ5R2V0U3RyaW5nKG1fZ3JhcGgpIHx8ICEhbV9ub2RlLT5jaGlsZDIoKS0+dHJ5
R2V0U3RyaW5nKG1fZ3JhcGgpKSkgeworICAgICAgICAgICAgICAgIGF1dG8gdHJ5R2V0Q29uc3Rh
bnQgPSBbJl0gKE5vZGUqIG5vZGUpIC0+IFN0cmluZyB7CisgICAgICAgICAgICAgICAgICAgIFN0
cmluZyBzdHJpbmcgPSBub2RlLT50cnlHZXRTdHJpbmcobV9ncmFwaCk7CisgICAgICAgICAgICAg
ICAgICAgIGlmICghc3RyaW5nLmlzRW1wdHkoKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHJl
dHVybiBzdHJpbmc7CisgICAgICAgICAgICAgICAgICAgIEpTVmFsdWUgdmFsdWUgPSBub2RlLT5j
b25zdGFudCgpLT52YWx1ZSgpOworICAgICAgICAgICAgICAgICAgICBpZiAoIXZhbHVlKQorICAg
ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZygpOworICAgICAgICAgICAgICAgICAg
ICBpZiAodmFsdWUuaXNJbnQzMigpKQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFN0
cmluZzo6bnVtYmVyKHZhbHVlLmFzSW50MzIoKSk7CisgICAgICAgICAgICAgICAgICAgIGlmICh2
YWx1ZS5pc051bWJlcigpKQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZzo6
bnVtYmVyVG9TdHJpbmdFQ01BU2NyaXB0KHZhbHVlLmFzTnVtYmVyKCkpOworICAgICAgICAgICAg
ICAgICAgICBpZiAodmFsdWUuaXNCb29sZWFuKCkpCisgICAgICAgICAgICAgICAgICAgICAgICBy
ZXR1cm4gdmFsdWUuYXNCb29sZWFuKCkgPyBBU0NJSUxpdGVyYWwoInRydWUiKSA6IEFTQ0lJTGl0
ZXJhbCgiZmFsc2UiKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmlzTnVsbCgpKQor
ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEFTQ0lJTGl0ZXJhbCgibnVsbCIpOworICAg
ICAgICAgICAgICAgICAgICBpZiAodmFsdWUuaXNVbmRlZmluZWQoKSkKKyAgICAgICAgICAgICAg
ICAgICAgICAgIHJldHVybiBBU0NJSUxpdGVyYWwoInVuZGVmaW5lZCIpOworICAgICAgICAgICAg
ICAgICAgICAvLyBGSVhNRTogbWF5YmUgZG8gbmljZSB0aGluZ3MgZm9yIFN5bWJvbHM/CisgICAg
ICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcoKTsKKyAgICAgICAgICAgICAgICB9OworCisg
ICAgICAgICAgICAgICAgU3RyaW5nIGxlZnRTdHJpbmcgPSB0cnlHZXRDb25zdGFudChtX25vZGUt
PmNoaWxkMSgpLm5vZGUoKSk7CisgICAgICAgICAgICAgICAgaWYgKCFsZWZ0U3RyaW5nKQorICAg
ICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBTdHJpbmcgcmlnaHRTdHJp
bmcgPSB0cnlHZXRDb25zdGFudChtX25vZGUtPmNoaWxkMigpLm5vZGUoKSk7CisgICAgICAgICAg
ICAgICAgaWYgKCFyaWdodFN0cmluZykKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAg
ICAgICAgICAgICAgICBTdHJpbmdCdWlsZGVyIGJ1aWxkZXI7CisgICAgICAgICAgICAgICAgYnVp
bGRlci5hcHBlbmQobGVmdFN0cmluZyk7CisgICAgICAgICAgICAgICAgYnVpbGRlci5hcHBlbmQo
cmlnaHRTdHJpbmcpOworICAgICAgICAgICAgICAgIG1fbm9kZS0+Y29udmVydFRvTGF6eUpTQ29u
c3RhbnQoCisgICAgICAgICAgICAgICAgICAgIG1fZ3JhcGgsIExhenlKU1ZhbHVlOjpuZXdTdHJp
bmcobV9ncmFwaCwgYnVpbGRlci50b1N0cmluZygpKSk7CisgICAgICAgICAgICAgICAgbV9jaGFu
Z2VkID0gdHJ1ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9
CisKICAgICAgICAgY2FzZSBNYWtlUm9wZToKLSAgICAgICAgY2FzZSBWYWx1ZUFkZDoKICAgICAg
ICAgY2FzZSBTdHJDYXQ6IHsKICAgICAgICAgICAgIFN0cmluZyBsZWZ0U3RyaW5nID0gbV9ub2Rl
LT5jaGlsZDEoKS0+dHJ5R2V0U3RyaW5nKG1fZ3JhcGgpOwogICAgICAgICAgICAgaWYgKCFsZWZ0
U3RyaW5nKQo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>291112</attachid>
            <date>2016-10-10 09:12:59 -0700</date>
            <delta_ts>2016-10-10 19:42:34 -0700</delta_ts>
            <desc>WIP</desc>
            <filename>b-backup.diff</filename>
            <type>text/plain</type>
            <size>6738</size>
            <attacher name="Saam Barati">saam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9kZmcvREZHQnl0ZUNvZGVQYXJzZXIuY3BwCj09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT0KLS0tIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9kZmcvREZHQnl0ZUNvZGVQYXJzZXIu
Y3BwCShyZXZpc2lvbiAyMDY5NjkpCisrKyBTb3VyY2UvSmF2YVNjcmlwdENvcmUvZGZnL0RGR0J5
dGVDb2RlUGFyc2VyLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNDIzOSw3ICs0MjM5LDEyIEBAIGJv
b2wgQnl0ZUNvZGVQYXJzZXI6OnBhcnNlQmxvY2sodW5zaWduZWQKICAgICAgICAg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gICAgICAgICAgICAgIHJldHVy
biBTdHJpbmcoKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmlzSW50MzIoKSkKKyAg
ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmc6Om51bWJlcih2YWx1ZS5hc0ludDMy
KCkpOworICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUuaXNOdW1iZXIoKSkKKyAgICAgICAg
ICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmc6Om51bWJlclRvU3RyaW5nRUNNQVNjcmlwdCh2
YWx1ZS5hc051bWJlcigpKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmlzQm9vbGVh
bigpKQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlLmFzQm9vbGVhbigpID8g
QVNDSUlMaXRlcmFsKCJ0cnVlIikgOiBBU0NJSUxpdGVyYWwoImZhbHNlIik7CisgICAgICAgICAg
ICAgICAgICAgIGlmICh2YWx1ZS5pc051bGwoKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHJl
dHVybiBBU0NJSUxpdGVyYWwoIm51bGwiKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVl
LmlzVW5kZWZpbmVkKCkpCisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gQVNDSUlMaXRl
cmFsKCJ1bmRlZmluZWQiKTsKKyAgICAgICAgICAgICAgICAgICAgLy8gRklYTUU6IG1heWJlIGRv
IG5pY2UgdGhpbmdzIGZvciBTeW1ib2xzPworICAgICAgICAgICAgICAgICAgICByZXR1cm4gU3Ry
aW5nKCk7CisgICAgICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgICAgIFN0cmluZyBsZWZ0
U3RyaW5nID0gdHJ5R2V0Q29uc3RhbnQobV9ub2RlLT5jaGlsZDEoKS5ub2RlKCkpOworICAgICAg
ICAgICAgICAgIGlmICghbGVmdFN0cmluZykKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7Cisg
ICAgICAgICAgICAgICAgU3RyaW5nIHJpZ2h0U3RyaW5nID0gdHJ5R2V0Q29uc3RhbnQobV9ub2Rl
LT5jaGlsZDIoKS5ub2RlKCkpOworICAgICAgICAgICAgICAgIGlmICghcmlnaHRTdHJpbmcpCisg
ICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgU3RyaW5nQnVpbGRl
ciBidWlsZGVyOworICAgICAgICAgICAgICAgIGJ1aWxkZXIuYXBwZW5kKGxlZnRTdHJpbmcpOwor
ICAgICAgICAgICAgICAgIGJ1aWxkZXIuYXBwZW5kKHJpZ2h0U3RyaW5nKTsKKyAgICAgICAgICAg
ICAgICBtX25vZGUtPmNvbnZlcnRUb0xhenlKU0NvbnN0YW50KAorICAgICAgICAgICAgICAgICAg
ICBtX2dyYXBoLCBMYXp5SlNWYWx1ZTo6bmV3U3RyaW5nKG1fZ3JhcGgsIGJ1aWxkZXIudG9TdHJp
bmcoKSkpOworICAgICAgICAgICAgICAgIG1fY2hhbmdlZCA9IHRydWU7CisgICAgICAgICAgICB9
CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorCiAgICAgICAgIGNhc2UgTWFrZVJvcGU6
Ci0gICAgICAgIGNhc2UgVmFsdWVBZGQ6CiAgICAgICAgIGNhc2UgU3RyQ2F0OiB7CiAgICAgICAg
ICAgICBTdHJpbmcgbGVmdFN0cmluZyA9IG1fbm9kZS0+Y2hpbGQxKCktPnRyeUdldFN0cmluZyht
X2dyYXBoKTsKICAgICAgICAgICAgIGlmICghbGVmdFN0cmluZykKSW5kZXg6IFNvdXJjZS9KYXZh
U2NyaXB0Q29yZS9mdGwvRlRMTG93ZXJERkdUb0IzLmNwcAo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2Uv
SmF2YVNjcmlwdENvcmUvZnRsL0ZUTExvd2VyREZHVG9CMy5jcHAJKHJldmlzaW9uIDIwNjk2OSkK
KysrIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9mdGwvRlRMTG93ZXJERkdUb0IzLmNwcAkod29ya2lu
ZyBjb3B5KQpAQCAtMjYwNiw4ICsyNjA2LDggQEAgcHJpdmF0ZToKICAgICB2b2lkIGNvbXBpbGVD
aGVja1N0cmluZ0lkZW50KCkKICAgICB7CiAgICAgICAgIFVuaXF1ZWRTdHJpbmdJbXBsKiB1aWQg
PSBtX25vZGUtPnVpZE9wZXJhbmQoKTsKLSAgICAgICAgTFZhbHVlIHN0cmluZyA9IGxvd1N0cmlu
Z0lkZW50KG1fbm9kZS0+Y2hpbGQxKCkpOwotICAgICAgICBMVmFsdWUgc3RyaW5nSW1wbCA9IG1f
b3V0LmxvYWRQdHIoc3RyaW5nLCBtX2hlYXBzLkpTU3RyaW5nX3ZhbHVlKTsKKyAgICAgICAgTFZh
bHVlIHN0cmluZ0ltcGwgPSBsb3dTdHJpbmdJZGVudChtX25vZGUtPmNoaWxkMSgpKTsKKyAgICAg
ICAgLy9MVmFsdWUgc3RyaW5nSW1wbCA9IG1fb3V0LmxvYWRQdHIoc3RyaW5nLCBtX2hlYXBzLkpT
U3RyaW5nX3ZhbHVlKTsKICAgICAgICAgc3BlY3VsYXRlKEJhZElkZW50LCBub1ZhbHVlKCksIG51
bGxwdHIsIG1fb3V0Lm5vdEVxdWFsKHN0cmluZ0ltcGwsIG1fb3V0LmNvbnN0SW50UHRyKHVpZCkp
KTsKICAgICB9CiAK
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>291215</attachid>
            <date>2016-10-10 19:42:34 -0700</date>
            <delta_ts>2016-10-11 03:17:30 -0700</delta_ts>
            <desc>patch</desc>
            <filename>b-backup.diff</filename>
            <type>text/plain</type>
            <size>8055</size>
            <attacher name="Saam Barati">saam</attacher>
            
              <data encoding="base64">SW5kZXg6IEpTVGVzdHMvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIEpTVGVzdHMvQ2hhbmdlTG9n
CShyZXZpc2lvbiAyMDcwMzYpCisrKyBKU1Rlc3RzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpA
QCAtMSwzICsxLDE2IEBACisyMDE2LTEwLTEwICBTYWFtIEJhcmF0aSAgPHNiYXJhdGlAYXBwbGUu
Y29tPgorCisgICAgICAgIFZhbHVlQWRkIHNob3VsZCBiZSBjb25zdGFudCBmb2xkZWQgaWYgdGhl
IG9wZXJhbmRzIGFyZSBjb25zdGFudCBTdHJpbmcsUHJpbWl0aXZlIG9yIFByaW1pdGl2ZSxTdHJp
bmcKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE2MzE4
MgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgICogbWlj
cm9iZW5jaG1hcmtzL3N0cmluZy1hZGQtY29uc3RhbnQtZm9sZGluZy5qczogQWRkZWQuCisgICAg
ICAgIChhc3NlcnQpOgorICAgICAgICAocnVuVGVzdHMpOgorICAgICAgICAoYWRkKToKKyAgICAg
ICAgKHRlc3QpOgorCiAyMDE2LTEwLTA3ICBNYXJrIExhbSAgPG1hcmsubGFtQGFwcGxlLmNvbT4K
IAogICAgICAgICBPYmplY3QuZnJlZXplKCkgYW5kIHNlYWwoKSBzaG91bGQgdGhyb3cgaWYgW1tQ
cmV2ZW50RXh0ZW5zaW9uc11dKCkgZmFpbHMuCkluZGV4OiBKU1Rlc3RzL21pY3JvYmVuY2htYXJr
cy9zdHJpbmctYWRkLWNvbnN0YW50LWZvbGRpbmcuanMKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gSlNUZXN0cy9t
aWNyb2JlbmNobWFya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r
VG9wLT5tX2V4aXRQcm9maWxlLmhhc0V4aXRTaXRlKG1fY3VycmVudEluZGV4LCBCYWRDZWxsKSkg
eworICAgICAgICAgICAgICAgIGlmIChieVZhbEluZm8gCisgICAgICAgICAgICAgICAgICAgICYm
IGJ5VmFsSW5mby0+c3R1YkluZm8KKyAgICAgICAgICAgICAgICAgICAgJiYgIWJ5VmFsSW5mby0+
dG9va1Nsb3dQYXRoCisgICAgICAgICAgICAgICAgICAgICYmICFtX2lubGluZVN0YWNrVG9wLT5t
X2V4aXRQcm9maWxlLmhhc0V4aXRTaXRlKG1fY3VycmVudEluZGV4LCBCYWRJZGVudCkKKyAgICAg
ICAgICAgICAgICAgICAgJiYgIW1faW5saW5lU3RhY2tUb3AtPm1fZXhpdFByb2ZpbGUuaGFzRXhp
dFNpdGUobV9jdXJyZW50SW5kZXgsIEJhZFR5cGUpCisgICAgICAgICAgICAgICAgICAgICYmICFt
X2lubGluZVN0YWNrVG9wLT5tX2V4aXRQcm9maWxlLmhhc0V4aXRTaXRlKG1fY3VycmVudEluZGV4
LCBCYWRDZWxsKSkgewogICAgICAgICAgICAgICAgICAgICBjb21waWxlZEFzUHV0QnlJZCA9IHRy
dWU7CiAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGlkZW50aWZpZXJOdW1iZXIgPSBtX2dy
YXBoLmlkZW50aWZpZXJzKCkuZW5zdXJlKGJ5VmFsSW5mby0+Y2FjaGVkSWQuaW1wbCgpKTsKICAg
ICAgICAgICAgICAgICAgICAgVW5pcXVlZFN0cmluZ0ltcGwqIHVpZCA9IG1fZ3JhcGguaWRlbnRp
ZmllcnMoKVtpZGVudGlmaWVyTnVtYmVyXTsKSW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9k
ZmcvREZHTGF6eUpTVmFsdWUuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9K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tMzIyLDggKzMyMiw0OCBAQCBwcml2YXRlOgogICAgICAgICAvLyBtb3ZlIHRoZXNlIHRvIHRo
ZSBhYnN0cmFjdCBpbnRlcnByZXRlciBvbmNlIEFic3RyYWN0VmFsdWUgY2FuIHN1cHBvcnQgTGF6
eUpTVmFsdWUuCiAgICAgICAgIC8vIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNn
aT9pZD0xNTUyMDQKIAorICAgICAgICBjYXNlIFZhbHVlQWRkOiB7CisgICAgICAgICAgICBpZiAo
bV9ub2RlLT5jaGlsZDEoKS0+aXNDb25zdGFudCgpCisgICAgICAgICAgICAgICAgJiYgbV9ub2Rl
LT5jaGlsZDIoKS0+aXNDb25zdGFudCgpCisgICAgICAgICAgICAgICAgJiYgKCEhbV9ub2RlLT5j
aGlsZDEoKS0+dHJ5R2V0U3RyaW5nKG1fZ3JhcGgpIHx8ICEhbV9ub2RlLT5jaGlsZDIoKS0+dHJ5
R2V0U3RyaW5nKG1fZ3JhcGgpKSkgeworICAgICAgICAgICAgICAgIGF1dG8gdHJ5R2V0Q29uc3Rh
bnRTdHJpbmcgPSBbJl0gKE5vZGUqIG5vZGUpIC0+IFN0cmluZyB7CisgICAgICAgICAgICAgICAg
ICAgIFN0cmluZyBzdHJpbmcgPSBub2RlLT50cnlHZXRTdHJpbmcobV9ncmFwaCk7CisgICAgICAg
ICAgICAgICAgICAgIGlmICghc3RyaW5nLmlzRW1wdHkoKSkKKyAgICAgICAgICAgICAgICAgICAg
ICAgIHJldHVybiBzdHJpbmc7CisgICAgICAgICAgICAgICAgICAgIEpTVmFsdWUgdmFsdWUgPSBu
b2RlLT5jb25zdGFudCgpLT52YWx1ZSgpOworICAgICAgICAgICAgICAgICAgICBpZiAoIXZhbHVl
KQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZygpOworICAgICAgICAgICAg
ICAgICAgICBpZiAodmFsdWUuaXNJbnQzMigpKQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0
dXJuIFN0cmluZzo6bnVtYmVyKHZhbHVlLmFzSW50MzIoKSk7CisgICAgICAgICAgICAgICAgICAg
IGlmICh2YWx1ZS5pc051bWJlcigpKQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFN0
cmluZzo6bnVtYmVyVG9TdHJpbmdFQ01BU2NyaXB0KHZhbHVlLmFzTnVtYmVyKCkpOworICAgICAg
ICAgICAgICAgICAgICBpZiAodmFsdWUuaXNCb29sZWFuKCkpCisgICAgICAgICAgICAgICAgICAg
ICAgICByZXR1cm4gdmFsdWUuYXNCb29sZWFuKCkgPyBBU0NJSUxpdGVyYWwoInRydWUiKSA6IEFT
Q0lJTGl0ZXJhbCgiZmFsc2UiKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmlzTnVs
bCgpKQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEFTQ0lJTGl0ZXJhbCgibnVsbCIp
OworICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUuaXNVbmRlZmluZWQoKSkKKyAgICAgICAg
ICAgICAgICAgICAgICAgIHJldHVybiBBU0NJSUxpdGVyYWwoInVuZGVmaW5lZCIpOworICAgICAg
ICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKCk7CisgICAgICAgICAgICAgICAgfTsKKworICAg
ICAgICAgICAgICAgIFN0cmluZyBsZWZ0U3RyaW5nID0gdHJ5R2V0Q29uc3RhbnRTdHJpbmcobV9u
b2RlLT5jaGlsZDEoKS5ub2RlKCkpOworICAgICAgICAgICAgICAgIGlmICghbGVmdFN0cmluZykK
KyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgU3RyaW5nIHJpZ2h0
U3RyaW5nID0gdHJ5R2V0Q29uc3RhbnRTdHJpbmcobV9ub2RlLT5jaGlsZDIoKS5ub2RlKCkpOwor
ICAgICAgICAgICAgICAgIGlmICghcmlnaHRTdHJpbmcpCisgICAgICAgICAgICAgICAgICAgIGJy
ZWFrOworCisgICAgICAgICAgICAgICAgU3RyaW5nQnVpbGRlciBidWlsZGVyOworICAgICAgICAg
ICAgICAgIGJ1aWxkZXIuYXBwZW5kKGxlZnRTdHJpbmcpOworICAgICAgICAgICAgICAgIGJ1aWxk
ZXIuYXBwZW5kKHJpZ2h0U3RyaW5nKTsKKyAgICAgICAgICAgICAgICBtX25vZGUtPmNvbnZlcnRU
b0xhenlKU0NvbnN0YW50KAorICAgICAgICAgICAgICAgICAgICBtX2dyYXBoLCBMYXp5SlNWYWx1
ZTo6bmV3U3RyaW5nKG1fZ3JhcGgsIGJ1aWxkZXIudG9TdHJpbmcoKSkpOworICAgICAgICAgICAg
ICAgIG1fY2hhbmdlZCA9IHRydWU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBicmVhazsK
KyAgICAgICAgfQorCiAgICAgICAgIGNhc2UgTWFrZVJvcGU6Ci0gICAgICAgIGNhc2UgVmFsdWVB
ZGQ6CiAgICAgICAgIGNhc2UgU3RyQ2F0OiB7CiAgICAgICAgICAgICBTdHJpbmcgbGVmdFN0cmlu
ZyA9IG1fbm9kZS0+Y2hpbGQxKCktPnRyeUdldFN0cmluZyhtX2dyYXBoKTsKICAgICAgICAgICAg
IGlmICghbGVmdFN0cmluZykK
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>291245</attachid>
            <date>2016-10-11 03:17:45 -0700</date>
            <delta_ts>2016-10-11 03:19:36 -0700</delta_ts>
            <desc>Patch for landing</desc>
            <filename>bug-163182-20161011121422.patch</filename>
            <type>text/plain</type>
            <size>28</size>
            <attacher name="youenn fablet">youennf</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjA3MDYwCg==
</data>
<flag name="commit-queue"
          id="314377"
          type_id="3"
          status="-"
          setter="commit-queue"
    />
          </attachment>
      

    </bug>

</bugzilla>