<?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>135311</bug_id>
          
          <creation_ts>2014-07-25 16:19:57 -0700</creation_ts>
          <short_desc>Web Inspector: shown() called on a content view when stepping over an instruction in the debugger</short_desc>
          <delta_ts>2014-08-05 11:30:09 -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>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</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="Nobody">webkit-unassigned</assigned_to>
          <cc>burg</cc>
    
    <cc>commit-queue</cc>
    
    <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1024951</commentid>
    <comment_count>0</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-25 16:19:57 -0700</bug_when>
    <thetext>shown() is called on a ContentView every time the debugger steps over the instruction.

Do we want to keep these semantics? If so, I&apos;d argue it&apos;s apt to rename this function because it doesn&apos;t necessarily match when the screen is actually &apos;shown&apos;.
Or maybe, we should prevent screens that are already visible from having &apos;shown&apos; called on them.

The origin of the shown() is probably caused by an event from DebuggerManager every time it steps over a function.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024952</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-07-25 16:20:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/17817144&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025017</commentid>
    <comment_count>2</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-26 09:12:33 -0700</bug_when>
    <thetext>It wasn&apos;t intended to be called multiple times.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025514</commentid>
    <comment_count>3</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-29 10:56:19 -0700</bug_when>
    <thetext>It seems like the main problem is that when stepping over an instruction, the debugger on the JSC side skips to the next instruction, and then emits the paused event. When the Inspector sees this pause event, it adds a new backForwardEntry and shows that new backForwardEntry, even if the content view it shows is for the same Resource. So, if stepping over every instruction in a JS file, there will be backForwardEntries for every instruction that&apos;s been stepped over. So clicking the back button at the top of the content browser will just show older content views that are really just the same file that we&apos;ve been stepping over instructions within that file. The problem, then, doesn&apos;t seem to be that shown() is called multiple times on the same content view (because new content views for the same resource are repeatedly created), but rather, that we create new content views for every instruction we step over. This also seems bad from the user experience point of view of stepping over ten instructions, and then wanting to click back to go back to the previous JS file, and having to click back 10 times just to skip over these 10 content views that were created for each pause event.

I&apos;m not sure what the correct solution for this is, but I think the way it is set up now isn&apos;t the correct architecture. 

What do you all think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025517</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 11:05:18 -0700</bug_when>
    <thetext>The back/forward list is not just resources (views) but also scroll positions and other cookie data.

So the back button should be jumping around in the view to previous scroll positions. This is how Xcode behaves.

shown() should still probably not be called if the view does not change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025518</commentid>
    <comment_count>5</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 11:06:38 -0700</bug_when>
    <thetext>We probably should not push new back forward entries for each pause/resume if the scroll position didn&apos;t change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025519</commentid>
    <comment_count>6</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-29 11:09:21 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; We probably should not push new back forward entries for each pause/resume if the scroll position didn&apos;t change.

Yeah, that seems reasonable to me. I think saving them for each pause/resume is overkill when stepping over instructions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025523</commentid>
    <comment_count>7</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 11:12:33 -0700</bug_when>
    <thetext>It looks like this code is at fault:

        if (currentEntry &amp;&amp; currentEntry.contentView === contentView &amp;&amp; Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie))
            return currentEntry.contentView;


It only considers the cookie and view when testing if a new entry needs to be pushed. It should also compare scroll positions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025524</commentid>
    <comment_count>8</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-07-29 11:14:20 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; The problem, then, doesn&apos;t seem to be that shown() is called multiple times on the same content view (because new content views for the same resource are repeatedly created), but rather, that we create new content views for every instruction we step over.

Do we really create a new ContentView?


&gt; This also seems bad from the user experience point of view of stepping over ten instructions, and then wanting to click back to go back to the previous JS file, and having to click back 10 times just to skip over these 10 content views that were created for each pause event.

That sounds unintentional. I think the back forward list should be for specific user events.

    1. Showing a ContentView, by clicking a Script/Resource Tree Element in the source sidebar
    2. Jumping to a location by clicking a Breakpoint Tree Element in the debugger sidebar
    3. Jumping to a location by clicking a CallFrame Tree Element in the debugger sidebar
    4. Jumping to a location by clicking a (source:line:column) link anywhere in the UI
    5. Hiding a ContentView, this may want to add a new entry or replace the current entry

I think stepping in the debugger it would be unexpected that that adds a new back/forward entry other than the possibility of normal navigation with (1) or (5).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025525</commentid>
    <comment_count>9</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-07-29 11:15:00 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; the source sidebar

Resource* sidebar</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025526</commentid>
    <comment_count>10</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-29 11:16:13 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; It looks like this code is at fault:
&gt; 
&gt;         if (currentEntry &amp;&amp; currentEntry.contentView === contentView &amp;&amp; Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie))
&gt;             return currentEntry.contentView;
&gt; 
&gt; 
&gt; It only considers the cookie and view when testing if a new entry needs to be pushed. It should also compare scroll positions.

Okay, I&apos;ll look into it. I was actually looking at that code path earlier, and it actually does what it&apos;s supposed two thirds of the time. It seems like that code path is travelled down 3 times for each step-over, and on one of the three paths when stepping over, that test fails.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025527</commentid>
    <comment_count>11</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 11:17:22 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #7)
&gt; &gt; It looks like this code is at fault:
&gt; &gt; 
&gt; &gt;         if (currentEntry &amp;&amp; currentEntry.contentView === contentView &amp;&amp; Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie))
&gt; &gt;             return currentEntry.contentView;
&gt; &gt; 
&gt; &gt; 
&gt; &gt; It only considers the cookie and view when testing if a new entry needs to be pushed. It should also compare scroll positions.
&gt; 
&gt; Okay, I&apos;ll look into it. I was actually looking at that code path earlier, and it actually does what it&apos;s supposed two thirds of the time. It seems like that code path is travelled down 3 times for each step-over, and on one of the three paths when stepping over, that test fails.

Three times sounds like two too many.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025528</commentid>
    <comment_count>12</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-29 11:19:57 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; 
&gt; Do we really create a new ContentView?
&gt; 

I&apos;m not 100% sure on this. I think the more accurate statement is new BackForwardEntries are created.

&gt; 
&gt; That sounds unintentional. I think the back forward list should be for specific user events.
&gt; 
&gt;     1. Showing a ContentView, by clicking a Script/Resource Tree Element in the source sidebar
&gt;     2. Jumping to a location by clicking a Breakpoint Tree Element in the debugger sidebar
&gt;     3. Jumping to a location by clicking a CallFrame Tree Element in the debugger sidebar
&gt;     4. Jumping to a location by clicking a (source:line:column) link anywhere in the UI
&gt;     5. Hiding a ContentView, this may want to add a new entry or replace the current entry
&gt; 
&gt; I think stepping in the debugger it would be unexpected that that adds a new back/forward entry other than the possibility of normal navigation with (1) or (5).

Yeah that seems reasonable. I would also add that a new BackForwardEntry should be added when a debugger paused event causes you to move to a completely new location within the same file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025529</commentid>
    <comment_count>13</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-29 11:21:56 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; It looks like this code is at fault:
&gt; &gt; &gt; 
&gt; &gt; &gt;         if (currentEntry &amp;&amp; currentEntry.contentView === contentView &amp;&amp; Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie))
&gt; &gt; &gt;             return currentEntry.contentView;
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; It only considers the cookie and view when testing if a new entry needs to be pushed. It should also compare scroll positions.
&gt; &gt; 
&gt; &gt; Okay, I&apos;ll look into it. I was actually looking at that code path earlier, and it actually does what it&apos;s supposed two thirds of the time. It seems like that code path is travelled down 3 times for each step-over, and on one of the three paths when stepping over, that test fails.
&gt; 
&gt; Three times sounds like two too many.

Yeah this is a stack trace after stepping over an instruction:

file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:138:22: CONSOLE TRACE
0: showContentView(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:138:22)
1: showContentViewForRepresentedObject(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentBrowser.js:158:58)
2: showSourceCode(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceSidebarPanel.js:181:72)
3: showSourceCodeLocation(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceSidebarPanel.js:186:28)
4: _treeElementSelected(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/DebuggerSidebarPanel.js:525:69)
5: (unknown)([native code])
6: select(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/TreeOutline.js:976:34)
7: _debuggerCallFramesDidChange(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/DebuggerSidebarPanel.js:395:39)
8: dispatch(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Base/Object.js:180:55)
9: dispatchEventToListeners(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Base/Object.js:187:17)
10: debuggerDidPause(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Controllers/DebuggerManager.js:379:38)
11: paused(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/DebuggerObserver.js:58:54)
12: dispatchEvent(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:309:42)
13: _dispatchEvent(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:215:32)
14: dispatch(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:89:32)
15: dispatchNextQueuedMessageFromBackend(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/MessageDispatcher.js:31:34)
16: (unknown)([native code])
17: global code(file:///Volumes/Data/test.js:2:1)
file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:138:22: CONSOLE TRACE
0: showContentView(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:138:22)
1: _showContentViewForIdentifier(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceClusterContentView.js:236:57)
2: restoreFromCookie(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceClusterContentView.js:147:61)
3: _restoreFromCookie(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Models/BackForwardEntry.js:77:43)
4: prepareToShow(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Models/BackForwardEntry.js:57:32)
5: _showEntry(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:402:28)
6: showBackForwardEntryForIndex(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:203:24)
7: showContentView(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:180:42)
8: showContentViewForRepresentedObject(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentBrowser.js:158:58)
9: showSourceCode(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceSidebarPanel.js:181:72)
10: showSourceCodeLocation(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceSidebarPanel.js:186:28)
11: _treeElementSelected(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/DebuggerSidebarPanel.js:525:69)
12: (unknown)([native code])
13: select(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/TreeOutline.js:976:34)
14: _debuggerCallFramesDidChange(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/DebuggerSidebarPanel.js:395:39)
15: dispatch(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Base/Object.js:180:55)
16: dispatchEventToListeners(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Base/Object.js:187:17)
17: debuggerDidPause(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Controllers/DebuggerManager.js:379:38)
18: paused(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/DebuggerObserver.js:58:54)
19: dispatchEvent(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:309:42)
20: _dispatchEvent(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:215:32)
21: dispatch(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:89:32)
22: dispatchNextQueuedMessageFromBackend(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/MessageDispatcher.js:31:34)
23: (unknown)([native code])
24: global code(file:///Volumes/Data/test.js:2:1)
file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:138:22: CONSOLE TRACE
0: showContentView(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:138:22)
1: _showContentViewForIdentifier(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceClusterContentView.js:236:57)
2: shown(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceClusterContentView.js:130:43)
3: prepareToShow(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Models/BackForwardEntry.js:60:31)
4: _showEntry(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:402:28)
5: showBackForwardEntryForIndex(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:203:24)
6: showContentView(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentViewContainer.js:180:42)
7: showContentViewForRepresentedObject(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ContentBrowser.js:158:58)
8: showSourceCode(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceSidebarPanel.js:181:72)
9: showSourceCodeLocation(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/ResourceSidebarPanel.js:186:28)
10: _treeElementSelected(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/DebuggerSidebarPanel.js:525:69)
11: (unknown)([native code])
12: select(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/TreeOutline.js:976:34)
13: _debuggerCallFramesDidChange(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/DebuggerSidebarPanel.js:395:39)
14: dispatch(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Base/Object.js:180:55)
15: dispatchEventToListeners(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Base/Object.js:187:17)
16: debuggerDidPause(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Controllers/DebuggerManager.js:379:38)
17: paused(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/DebuggerObserver.js:58:54)
18: dispatchEvent(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:309:42)
19: _dispatchEvent(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:215:32)
20: dispatch(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/InspectorBackend.js:89:32)
21: dispatchNextQueuedMessageFromBackend(file:///Volumes/Data/WK/OpenSource/WebKitBuild/Release/WebInspectorUI.framework/Resources/Protocol/MessageDispatcher.js:31:34)
22: (unknown)([native code])
23: global code(file:///Volumes/Data/test.js:2:1)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025535</commentid>
    <comment_count>14</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 11:50:25 -0700</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #11)
&gt; &gt; (In reply to comment #10)
&gt; &gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; &gt; It looks like this code is at fault:
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt;         if (currentEntry &amp;&amp; currentEntry.contentView === contentView &amp;&amp; Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie))
&gt; &gt; &gt; &gt;             return currentEntry.contentView;
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; It only considers the cookie and view when testing if a new entry needs to be pushed. It should also compare scroll positions.
&gt; &gt; &gt; 
&gt; &gt; &gt; Okay, I&apos;ll look into it. I was actually looking at that code path earlier, and it actually does what it&apos;s supposed two thirds of the time. It seems like that code path is travelled down 3 times for each step-over, and on one of the three paths when stepping over, that test fails.
&gt; &gt; 
&gt; &gt; Three times sounds like two too many.
&gt; 
&gt; Yeah this is a stack trace after stepping over an instruction:
&gt; 
&gt; [snip]

So this is a case of ResourceClusterContentView showing a sub-view, so this is likely correct.

I think we should add an isEqual function to BackForwardEntry that also looks at _contentView, _cookie and _scrollPositions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025541</commentid>
    <comment_count>15</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 12:29:01 -0700</bug_when>
    <thetext>(In reply to comment #14)
&gt; (In reply to comment #13)
&gt; &gt; (In reply to comment #11)
&gt; &gt; &gt; (In reply to comment #10)
&gt; &gt; &gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; &gt; &gt; It looks like this code is at fault:
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt;         if (currentEntry &amp;&amp; currentEntry.contentView === contentView &amp;&amp; Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie))
&gt; &gt; &gt; &gt; &gt;             return currentEntry.contentView;
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; It only considers the cookie and view when testing if a new entry needs to be pushed. It should also compare scroll positions.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Okay, I&apos;ll look into it. I was actually looking at that code path earlier, and it actually does what it&apos;s supposed two thirds of the time. It seems like that code path is travelled down 3 times for each step-over, and on one of the three paths when stepping over, that test fails.
&gt; &gt; &gt; 
&gt; &gt; &gt; Three times sounds like two too many.
&gt; &gt; 
&gt; &gt; Yeah this is a stack trace after stepping over an instruction:
&gt; &gt; 
&gt; &gt; [snip]
&gt; 
&gt; So this is a case of ResourceClusterContentView showing a sub-view, so this is likely correct.
&gt; 
&gt; I think we should add an isEqual function to BackForwardEntry that also looks at _contentView, _cookie and _scrollPositions.

While that would fix some other cases, it will not fix views that use CodeMirror since _scrollPositions is not used for those. So there is another bug with CodeMirror views not saving scroll positions. CodeMirror views do save the last &quot;jump&quot; location to the cookie, which will be used for this with a showSourceCodeLocation call. And the cookie is already compared.

So i think the behavior is correct as-is, where each jump to a new line in the same view pushes a new b/f entry. Not really the best behavior.

Still shown() should not be called if it is already showing the view.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025625</commentid>
    <comment_count>16</comment_count>
      <attachid>235724</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-29 19:28:15 -0700</bug_when>
    <thetext>Created attachment 235724
Idea for patch

What do you guys think of this patch?

It solves the issues I&apos;m having with shown() being called multiple times. But maybe calling _restoreFromCookie() is an abstraction violation. But this is the essence of what a patch to fix this would be, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025646</commentid>
    <comment_count>17</comment_count>
      <attachid>235724</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 20:55:00 -0700</bug_when>
    <thetext>Comment on attachment 235724
Idea for patch

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

Looks right!

&gt; Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js:205
&gt; +            currentEntry._restoreFromCookie();

Yeah, restoreFromCookie should drop the underscore and be a public method if this needs to call it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025674</commentid>
    <comment_count>18</comment_count>
      <attachid>235724</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-29 23:31:59 -0700</bug_when>
    <thetext>Comment on attachment 235724
Idea for patch

Actually it might be best to make a helper to do this. There are a couple other places where we do the _hideEntry(previousEntry) / _showEntry(currentEntry) dance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025736</commentid>
    <comment_count>19</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-30 10:46:42 -0700</bug_when>
    <thetext>(In reply to comment #17)
&gt; (From update of attachment 235724 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=235724&amp;action=review
&gt; 
&gt; Looks right!
&gt; 
&gt; &gt; Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js:205
&gt; &gt; +            currentEntry._restoreFromCookie();
&gt; 
&gt; Yeah, restoreFromCookie should drop the underscore and be a public method if this needs to call it.

Okay. I&apos;ll probably end up doing that. Is it the intention of restoreFromCookie to be called more than once? Or maybe should there be another interface to updating the lineNumber info.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025737</commentid>
    <comment_count>20</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-30 10:47:07 -0700</bug_when>
    <thetext>(In reply to comment #18)
&gt; (From update of attachment 235724 [details])
&gt; Actually it might be best to make a helper to do this. There are a couple other places where we do the _hideEntry(previousEntry) / _showEntry(currentEntry) dance.

Okay. I&apos;ll make this a helper.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025740</commentid>
    <comment_count>21</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-30 10:50:42 -0700</bug_when>
    <thetext>(In reply to comment #20)
&gt; (In reply to comment #18)
&gt; &gt; (From update of attachment 235724 [details] [details])
&gt; &gt; Actually it might be best to make a helper to do this. There are a couple other places where we do the _hideEntry(previousEntry) / _showEntry(currentEntry) dance.
&gt; 
&gt; Okay. I&apos;ll make this a helper.

It actually doesn&apos;t seem like there is a good way to generalize this to all other place that call both _showEntry/_hideEntry</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025746</commentid>
    <comment_count>22</comment_count>
      <attachid>235750</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-30 10:59:56 -0700</bug_when>
    <thetext>Created attachment 235750
another patch proposition

This could also be a way to implement that patch, that passes in a flag indicating whether BackForwardEntry should call shown().

Which do you all like better?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025887</commentid>
    <comment_count>23</comment_count>
      <attachid>235750</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-30 20:11:38 -0700</bug_when>
    <thetext>Comment on attachment 235750
another patch proposition

I like this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1025911</commentid>
    <comment_count>24</comment_count>
      <attachid>235750</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-07-30 21:39:37 -0700</bug_when>
    <thetext>Comment on attachment 235750
another patch proposition

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

&gt; Source/WebInspectorUI/UserInterface/Models/BackForwardEntry.js:57
&gt;          this._restoreFromCookie();

Did we also determine that _restoreFromCookie might call shown()? That was being tracked separately though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1026049</commentid>
    <comment_count>25</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-07-31 13:09:54 -0700</bug_when>
    <thetext>(In reply to comment #24)
&gt; (From update of attachment 235750 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=235750&amp;action=review
&gt; 
&gt; &gt; Source/WebInspectorUI/UserInterface/Models/BackForwardEntry.js:57
&gt; &gt;          this._restoreFromCookie();
&gt; 
&gt; Did we also determine that _restoreFromCookie might call shown()? That was being tracked separately though.

I haven&apos;t looked into it, specifically. Anecdotally, this hasn&apos;t happened in my testing of the above patches. That&apos;s not to say it might not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1026768</commentid>
    <comment_count>26</comment_count>
      <attachid>236000</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2014-08-04 19:04:08 -0700</bug_when>
    <thetext>Created attachment 236000
patch

I&apos;ve tested this patch, and it solves the problem of shown not being repeatedly called when stepping over instructions in the debugger, 
but it doesn&apos;t solve all the problems of shown being called multiple times. I think for further fixing the redundant calls to shown, 
I should do more investigation on: https://bugs.webkit.org/show_bug.cgi?id=135000.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1026896</commentid>
    <comment_count>27</comment_count>
      <attachid>236000</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-08-05 11:30:04 -0700</bug_when>
    <thetext>Comment on attachment 236000
patch

Clearing flags on attachment: 236000

Committed r172038: &lt;http://trac.webkit.org/changeset/172038&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1026897</commentid>
    <comment_count>28</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-08-05 11:30:09 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>235724</attachid>
            <date>2014-07-29 19:28:15 -0700</date>
            <delta_ts>2014-07-30 10:59:56 -0700</delta_ts>
            <desc>Idea for patch</desc>
            <filename>patch.diff</filename>
            <type>text/plain</type>
            <size>1336</size>
            <attacher name="Saam Barati">saam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJJbnNwZWN0b3JVSS9Vc2VySW50ZXJmYWNlL1ZpZXdzL0NvbnRlbnRW
aWV3Q29udGFpbmVyLmpzCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XZWJJbnNwZWN0b3JVSS9Vc2Vy
SW50ZXJmYWNlL1ZpZXdzL0NvbnRlbnRWaWV3Q29udGFpbmVyLmpzCShyZXZpc2lvbiAxNzE2OTMp
CisrKyBTb3VyY2UvV2ViSW5zcGVjdG9yVUkvVXNlckludGVyZmFjZS9WaWV3cy9Db250ZW50Vmll
d0NvbnRhaW5lci5qcwkod29ya2luZyBjb3B5KQpAQCAtMTkwLDE2ICsxOTAsMjEgQEAgV2ViSW5z
cGVjdG9yLkNvbnRlbnRWaWV3Q29udGFpbmVyLnByb3RvdAogICAgICAgICBpZiAodGhpcy5fY3Vy
cmVudEluZGV4ID09PSBpbmRleCkKICAgICAgICAgICAgIHJldHVybjsKIAotICAgICAgICAvLyBI
aWRlIHRoZSBjdXJyZW50bHkgdmlzaWJsZSBjb250ZW50IHZpZXcuCiAgICAgICAgIHZhciBwcmV2
aW91c0VudHJ5ID0gdGhpcy5jdXJyZW50QmFja0ZvcndhcmRFbnRyeTsKLSAgICAgICAgaWYgKHBy
ZXZpb3VzRW50cnkpCi0gICAgICAgICAgICB0aGlzLl9oaWRlRW50cnkocHJldmlvdXNFbnRyeSk7
Ci0KICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4ID0gaW5kZXg7CiAgICAgICAgIHZhciBjdXJy
ZW50RW50cnkgPSB0aGlzLmN1cnJlbnRCYWNrRm9yd2FyZEVudHJ5OwogICAgICAgICBjb25zb2xl
LmFzc2VydChjdXJyZW50RW50cnkpOwogCi0gICAgICAgIHRoaXMuX3Nob3dFbnRyeShjdXJyZW50
RW50cnkpOworICAgICAgICB2YXIgaXNOZXdDb250ZW50VmlldyA9ICFwcmV2aW91c0VudHJ5IHx8
ICFjdXJyZW50RW50cnkuY29udGVudFZpZXcudmlzaWJsZTsKKyAgICAgICAgaWYgKGlzTmV3Q29u
dGVudFZpZXcpIHsKKyAgICAgICAgICAgIC8vIEhpZGUgdGhlIGN1cnJlbnRseSB2aXNpYmxlIGNv
bnRlbnQgdmlldy4KKyAgICAgICAgICAgIGlmIChwcmV2aW91c0VudHJ5KQorICAgICAgICAgICAg
ICAgIHRoaXMuX2hpZGVFbnRyeShwcmV2aW91c0VudHJ5KTsKKyAgICAgICAgICAgIHRoaXMuX3No
b3dFbnRyeShjdXJyZW50RW50cnkpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgY3Vy
cmVudEVudHJ5Ll9yZXN0b3JlRnJvbUNvb2tpZSgpOworICAgICAgICAgICAgdGhpcy51cGRhdGVM
YXlvdXQoKTsKKyAgICAgICAgfQogCiAgICAgICAgIHRoaXMuZGlzcGF0Y2hFdmVudFRvTGlzdGVu
ZXJzKFdlYkluc3BlY3Rvci5Db250ZW50Vmlld0NvbnRhaW5lci5FdmVudC5DdXJyZW50Q29udGVu
dFZpZXdEaWRDaGFuZ2UpOwogICAgIH0sCg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>235750</attachid>
            <date>2014-07-30 10:59:56 -0700</date>
            <delta_ts>2014-08-04 19:04:08 -0700</delta_ts>
            <desc>another patch proposition</desc>
            <filename>patch.diff</filename>
            <type>text/plain</type>
            <size>3650</size>
            <attacher name="Saam Barati">saam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJJbnNwZWN0b3JVSS9Vc2VySW50ZXJmYWNlL1ZpZXdzL0NvbnRlbnRW
aWV3Q29udGFpbmVyLmpzCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XZWJJbnNwZWN0b3JVSS9Vc2Vy
SW50ZXJmYWNlL1ZpZXdzL0NvbnRlbnRWaWV3Q29udGFpbmVyLmpzCShyZXZpc2lvbiAxNzE2OTMp
CisrKyBTb3VyY2UvV2ViSW5zcGVjdG9yVUkvVXNlckludGVyZmFjZS9WaWV3cy9Db250ZW50Vmll
d0NvbnRhaW5lci5qcwkod29ya2luZyBjb3B5KQpAQCAtMTkwLDE2ICsxOTAsMTkgQEAgV2ViSW5z
cGVjdG9yLkNvbnRlbnRWaWV3Q29udGFpbmVyLnByb3RvdAogICAgICAgICBpZiAodGhpcy5fY3Vy
cmVudEluZGV4ID09PSBpbmRleCkKICAgICAgICAgICAgIHJldHVybjsKIAotICAgICAgICAvLyBI
aWRlIHRoZSBjdXJyZW50bHkgdmlzaWJsZSBjb250ZW50IHZpZXcuCiAgICAgICAgIHZhciBwcmV2
aW91c0VudHJ5ID0gdGhpcy5jdXJyZW50QmFja0ZvcndhcmRFbnRyeTsKLSAgICAgICAgaWYgKHBy
ZXZpb3VzRW50cnkpCi0gICAgICAgICAgICB0aGlzLl9oaWRlRW50cnkocHJldmlvdXNFbnRyeSk7
Ci0KICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4ID0gaW5kZXg7CiAgICAgICAgIHZhciBjdXJy
ZW50RW50cnkgPSB0aGlzLmN1cnJlbnRCYWNrRm9yd2FyZEVudHJ5OwogICAgICAgICBjb25zb2xl
LmFzc2VydChjdXJyZW50RW50cnkpOwogCi0gICAgICAgIHRoaXMuX3Nob3dFbnRyeShjdXJyZW50
RW50cnkpOworICAgICAgICB2YXIgaXNOZXdDb250ZW50VmlldyA9ICFwcmV2aW91c0VudHJ5IHx8
ICFjdXJyZW50RW50cnkuY29udGVudFZpZXcudmlzaWJsZTsKKyAgICAgICAgaWYgKGlzTmV3Q29u
dGVudFZpZXcpIHsKKyAgICAgICAgICAgIC8vIEhpZGUgdGhlIGN1cnJlbnRseSB2aXNpYmxlIGNv
bnRlbnQgdmlldy4KKyAgICAgICAgICAgIGlmIChwcmV2aW91c0VudHJ5KQorICAgICAgICAgICAg
ICAgIHRoaXMuX2hpZGVFbnRyeShwcmV2aW91c0VudHJ5KTsKKyAgICAgICAgICAgIHRoaXMuX3No
b3dFbnRyeShjdXJyZW50RW50cnksIHRydWUpOworICAgICAgICB9IGVsc2UKKyAgICAgICAgICAg
IHRoaXMuX3Nob3dFbnRyeShjdXJyZW50RW50cnksIGZhbHNlKTsKIAogICAgICAgICB0aGlzLmRp
c3BhdGNoRXZlbnRUb0xpc3RlbmVycyh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isgICAgICAg
ICAgICB0aGlzLl9zaG93RW50cnkoY3VycmVudEVudHJ5LCB0cnVlKTsKICAgICAgICAgICAgIHRo
aXMuZGlzcGF0Y2hFdmVudFRvTGlzdGVuZXJzKFdlYkluc3BlY3Rvci5Db250ZW50Vmlld0NvbnRh
aW5lci5FdmVudC5DdXJyZW50Q29udGVudFZpZXdEaWRDaGFuZ2UpOwogICAgICAgICB9CiAgICAg
fSwKQEAgLTM1Miw3ICszNTUsNyBAQCBXZWJJbnNwZWN0b3IuQ29udGVudFZpZXdDb250YWluZXIu
cHJvdG90CiAgICAgICAgIGlmICghY3VycmVudEVudHJ5KQogICAgICAgICAgICAgcmV0dXJuOwog
Ci0gICAgICAgIHRoaXMuX3Nob3dFbnRyeShjdXJyZW50RW50cnkpOworICAgICAgICB0aGlzLl9z
aG93RW50cnkoY3VycmVudEVudHJ5LCB0cnVlKTsKICAgICB9LAogCiAgICAgaGlkZGVuOiBmdW5j
dGlvbigpCkBAIC0zOTMsMTIgKzM5NiwxMiBAQCBXZWJJbnNwZWN0b3IuQ29udGVudFZpZXdDb250
YWluZXIucHJvdG90CiAgICAgICAgIGNvbnRlbnRWaWV3LmNsb3NlZCgpOwogICAgIH0sCiAKLSAg
ICBfc2hvd0VudHJ5OiBmdW5jdGlvbihlbnRyeSkKKyAgICBfc2hvd0VudHJ5OiBmdW5jdGlvbihl
bnRyeSwgc2hvdWxkQ2FsbFNob3duKQogICAgIHsKICAgICAgICAgY29uc29sZS5hc3NlcnQoZW50
cnkgaW5zdGFuY2VvZiBXZWJJbnNwZWN0b3IuQmFja0ZvcndhcmRFbnRyeSk7CiAKICAgICAgICAg
dGhpcy5fYWRkQ29udGVudFZpZXdFbGVtZW50KGVudHJ5LmNvbnRlbnRWaWV3KTsKLSAgICAgICAg
ZW50cnkucHJlcGFyZVRvU2hvdygpOworICAgICAgICBlbnRyeS5wcmVwYXJlVG9TaG93KHNob3Vs
ZENhbGxTaG93bik7CiAgICAgfSwKIAogICAgIF9oaWRlRW50cnk6IGZ1bmN0aW9uKGVudHJ5KQpJ
bmRleDogU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRlcmZhY2UvTW9kZWxzL0JhY2tGb3J3
YXJkRW50cnkuanMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291cmNlL1dlYkluc3BlY3RvclVJL1VzZXJJbnRl
cmZhY2UvTW9kZWxzL0JhY2tGb3J3YXJkRW50cnkuanMJKHJldmlzaW9uIDE3MTY5MykKKysrIFNv
dXJjZS9XZWJJbnNwZWN0b3JVSS9Vc2VySW50ZXJmYWNlL01vZGVscy9CYWNrRm9yd2FyZEVudHJ5
LmpzCSh3b3JraW5nIGNvcHkpCkBAIC01MiwxMiArNTIsMTMgQEAgV2ViSW5zcGVjdG9yLkJhY2tG
b3J3YXJkRW50cnkucHJvdG90eXBlIAogICAgICAgICByZXR1cm4gT2JqZWN0LnNoYWxsb3dDb3B5
KHRoaXMuX2Nvb2tpZSk7CiAgICAgfSwKIAotICAgIHByZXBhcmVUb1Nob3c6IGZ1bmN0aW9uKCkK
KyAgICBwcmVwYXJlVG9TaG93OiBmdW5jdGlvbihzaG91bGRDYWxsU2hvd24pCiAgICAgewogICAg
ICAgICB0aGlzLl9yZXN0b3JlRnJvbUNvb2tpZSgpOwogCiAgICAgICAgIHRoaXMuY29udGVudFZp
ZXcudmlzaWJsZSA9IHRydWU7Ci0gICAgICAgIHRoaXMuY29udGVudFZpZXcuc2hvd24oKTsKKyAg
ICAgICAgaWYgKHNob3VsZENhbGxTaG93bikKKyAgICAgICAgICAgIHRoaXMuY29udGVudFZpZXcu
c2hvd24oKTsKICAgICAgICAgdGhpcy5jb250ZW50Vmlldy51cGRhdGVMYXlvdXQoKTsKICAgICB9
LAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>236000</attachid>
            <date>2014-08-04 19:04:08 -0700</date>
            <delta_ts>2014-08-05 11:30:04 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch.diff</filename>
            <type>text/plain</type>
            <size>5290</size>
            <attacher name="Saam Barati">saam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZwkocmV2aXNpb24gMTcyMDE3KQorKysgU291cmNl
L1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDI2IEBA
CisyMDE0LTA4LTA0ICBTYWFtIEJhcmF0aSAgPHNiYXJhdGlAYXBwbGUuY29tPgorCisgICAgICAg
IFdlYiBJbnNwZWN0b3I6IHNob3duKCkgY2FsbGVkIG9uIGEgY29udGVudCB2aWV3IHdoZW4gc3Rl
cHBpbmcgb3ZlciBhbiBpbnN0cnVjdGlvbiBpbiB0aGUgZGVidWdnZXIKKyAgICAgICAgaHR0cHM6
Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTEzNTMxMQorCisgICAgICAgIFJldmll
d2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIENvbnRlbnRWaWV3Q29udGFpbmVyIHNo
b3VsZCBub3QgcmVwZWF0ZWRseSBjYWxsIENvbnRlbnRWaWV3LnByb3RvdHlwZS5zaG93biAKKyAg
ICAgICAgb24gQ29udGVudFZpZXdzIHRoYXQgYXJlIGFscmVhZHkgdmlzaWJsZS4gQ29udGVudFZp
ZXdDb250YWluZXIgbm93IHBhc3NlcworICAgICAgICBhIGZsYWcgdG8gQmFja0ZvcndhcmRFbnRy
eS5wcm90b3R5cGUucHJlcGFyZVRvU2hvdyBpbmRpY2F0aW5nIHdoZXRoZXIgaXQgc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5Db250ZW50Vmlld0NvbnRhaW5lci5wcm90
b3QKICAgICAgICAgY29udGVudFZpZXcuY2xvc2VkKCk7CiAgICAgfSwKIAotICAgIF9zaG93RW50
cnk6IGZ1bmN0aW9uKGVudHJ5KQorICAgIF9zaG93RW50cnk6IGZ1bmN0aW9uKGVudHJ5LCBzaG91
bGRDYWxsU2hvd24pCiAgICAgewogICAgICAgICBjb25zb2xlLmFzc2VydChlbnRyeSBpbnN0YW5j
ZW9mIFdlYkluc3BlY3Rvci5CYWNrRm9yd2FyZEVudHJ5KTsKIAogICAgICAgICB0aGlzLl9hZGRD
b250ZW50Vmlld0VsZW1lbnQoZW50cnkuY29udGVudFZpZXcpOwotICAgICAgICBlbnRyeS5wcmVw
YXJlVG9TaG93KCk7CisgICAgICAgIGVudHJ5LnByZXBhcmVUb1Nob3coc2hvdWxkQ2FsbFNob3du
KTsKICAgICB9LAogCiAgICAgX2hpZGVFbnRyeTogZnVuY3Rpb24oZW50cnkpCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>