<?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>164804</bug_id>
          
          <creation_ts>2016-11-15 15:54:33 -0800</creation_ts>
          <short_desc>REGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs an error</short_desc>
          <delta_ts>2016-12-02 12:59:27 -0800</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>WebKit 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="Nikita Vasilyev">nvasilyev</reporter>
          <assigned_to name="Nikita Vasilyev">nvasilyev</assigned_to>
          <cc>bburg</cc>
    
    <cc>commit-queue</cc>
    
    <cc>joepeck</cc>
    
    <cc>mattbaker</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1251687</commentid>
    <comment_count>0</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-15 15:54:33 -0800</bug_when>
    <thetext>[Error] Error in getting basic block locations: The VM does not currently have a Control Flow Profiler.
	(anonymous function) (BasicBlockAnnotator.js:61)
	(anonymous function)
	_dispatchResponseToCallback (Connection.js:146)
	_dispatchResponse (Connection.js:116)
	dispatch (Connection.js:69)
	dispatch (InspectorBackend.js:151)
	dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:42)

https://github.com/WebKit/webkit/blob/fa99d39839021e1855d14ac7d05d7771b1bb66a6/Source/WebInspectorUI/UserInterface/Controllers/BasicBlockAnnotator.js#L61

Besides the logged error, everything continues working as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1251690</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-11-15 15:57:23 -0800</bug_when>
    <thetext>&lt;rdar://problem/29278028&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1251700</commentid>
    <comment_count>2</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-15 16:11:33 -0800</bug_when>
    <thetext>It looks like this.insertAnnotations gets called one last time after clicking on the [c] button.

The timeout is usually successfully canceled by Annotator#clear. It could be a race condition somewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1251756</commentid>
    <comment_count>3</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-15 18:59:48 -0800</bug_when>
    <thetext>Steps:
1. Open https://webkit.org/
2. Open Resources tab.
3. Select global.js.
4. Click on the [c] icon to enable Code Coverage.
5. Reload the page.
6. Click on the [c] icon to disable Code Coverage.

Notes:
When reloading a page, Web Inspector may, for a fraction of a second, display some &quot;ghost&quot; JS resource that is different from the one that was selected before page reload.

BasicBlockAnnotator gets created for that resource but, somehow, it doesn&apos;t get cleared properly. I&apos;m investigating.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1251963</commentid>
    <comment_count>4</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-16 12:30:31 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Notes:
&gt; When reloading a page, Web Inspector may, for a fraction of a second,
&gt; display some &quot;ghost&quot; JS resource that is different from the one that was
&gt; selected before page reload.
&gt; 
&gt; BasicBlockAnnotator gets created for that resource but, somehow, it doesn&apos;t
&gt; get cleared properly. I&apos;m investigating.

This hypothesis seems to be correct. I added console.trace(&quot;SourceCodeTextEditor %s&quot;, sourceCode._url) to SourceCodeTextEditor. I opened https://webkit.org/, selected global.js in the Resources, and reloaded the page. Here&apos;s the output:

[Log] Trace: SourceCodeTextEditor https://webkit.org/
	SourceCodeTextEditor (SourceCodeTextEditor.js:30)
	TextResourceContentView (TextResourceContentView.js:34)
	responseContentView (ResourceClusterContentView.js:69:82)
	_showContentViewForIdentifier (ResourceClusterContentView.js:217)
	restoreFromCookie (ResourceClusterContentView.js:139)
	_restoreFromCookie (BackForwardEntry.js:105)
	prepareToShow (BackForwardEntry.js:82)
	_showEntry (ContentViewContainer.js:497)
	showBackForwardEntryForIndex (ContentViewContainer.js:162)
	showContentView (ContentViewContainer.js:138)
	showDefaultContentViewForTreeElement (NavigationSidebarPanel.js:218:83)
	delayedWork (ResourceSidebarPanel.js:271)
	delayedWork

[Log] Trace: SourceCodeTextEditor null
	SourceCodeTextEditor (SourceCodeTextEditor.js:30)
	ScriptContentView (ScriptContentView.js:48)
	createFromRepresentedObject (ContentView.js:55)
	contentViewForRepresentedObject (ContentView.js:173:83)
	showDefaultContentViewForTreeElement (NavigationSidebarPanel.js:213:83)
	_addScript (DebuggerSidebarPanel.js:546)
	_scriptAdded (DebuggerSidebarPanel.js:523)
	dispatch (Object.js:170)
	dispatchEventToListeners (Object.js:177)
	scriptDidParse (DebuggerManager.js:696)
	scriptParsed (DebuggerObserver.js:53)
	dispatchEvent (InspectorBackend.js:287)
	_dispatchEvent (Connection.js:193)
	dispatch (Connection.js:71)
	dispatch (InspectorBackend.js:151)
	dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:42)

[Log] Trace: SourceCodeTextEditor https://webkit.org/wp-content/themes/webkit/scripts/global.js?ver=1.0
	SourceCodeTextEditor (SourceCodeTextEditor.js:30)
	TextResourceContentView (TextResourceContentView.js:34)
	responseContentView (ResourceClusterContentView.js:69:82)
	_showContentViewForIdentifier (ResourceClusterContentView.js:217)
	restoreFromCookie (ResourceClusterContentView.js:139)
	_restoreFromCookie (BackForwardEntry.js:105)
	prepareToShow (BackForwardEntry.js:82)
	_showEntry (ContentViewContainer.js:497)
	showBackForwardEntryForIndex (ContentViewContainer.js:162)
	showContentView (ContentViewContainer.js:138)
	showDefaultContentViewForTreeElement (NavigationSidebarPanel.js:218:83)
	_checkElementsForPendingViewStateCookie (NavigationSidebarPanel.js:776)
	_treeElementAddedOrChanged (NavigationSidebarPanel.js:633)
	dispatch (Object.js:170)
	dispatchEventToListeners (Object.js:177)
	insertChild (TreeOutline.js:227)
	_insertChildTreeElement (FolderizedTreeElement.js:253)
	_addTreeElement (FolderizedTreeElement.js:223)
	addChildForRepresentedObject (FolderizedTreeElement.js:110)
	onpopulate (FrameTreeElement.js:154)
	expand (TreeElement.js:373)
	shouldRefreshChildren (TreeElement.js:180)
	_populateFromNewChildQueue (FolderizedTreeElement.js:187)
	_populateFromNewChildQueue

Besides the expected call for global.js, there&apos;re two other calls. showDefaultContentViewForTreeElement showed a resource different from the previously selected one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252038</commentid>
    <comment_count>5</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-16 15:04:59 -0800</bug_when>
    <thetext>Switching from one resource to another, generally, clears Annotator&apos;s timeouts:

[Log] Trace: _clearTimeoutIfNeeded
Script {_listeners: null, _originalRevision: SourceCodeRevision, _currentRevision: SourceCodeRevision, _sourceMaps: null, _formatterSourceMap: null, …}
	_clearTimeoutIfNeeded (Annotator.js:105)
	pause (Annotator.js:54)
	hidden (SourceCodeTextEditor.js:155)
	hidden (TextResourceContentView.js:114)
	prepareToHide (BackForwardEntry.js:95)
	_hideEntry (ContentViewContainer.js:509)
	hidden (ContentViewContainer.js:387)
	hidden (ClusterContentView.js:74)
	prepareToHide (BackForwardEntry.js:95)
	_hideEntry (ContentViewContainer.js:509)
	showBackForwardEntryForIndex (ContentViewContainer.js:161)
	showContentView (ContentViewContainer.js:138)
	showRepresentedObject (ContentBrowserTabContentView.js:185)
	showRepresentedObject (Main.js:1146)
	_treeSelectionDidChange (ResourceSidebarPanel.js:420)
	dispatch (Object.js:170)
	dispatchEventToListeners (Object.js:177)
	select (TreeElement.js:507)
	selectOnMouseDown (TreeElement.js:464)
	treeElementMouseDown (TreeElement.js:276)

This, however, doesn&apos;t happen for a resource selected by showDefaultContentViewForTreeElement. It doesn&apos;t create a back forward entry and it doesn&apos;t call TextResourceContentView#hidden.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252126</commentid>
    <comment_count>6</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-16 17:30:56 -0800</bug_when>
    <thetext>The problem is that we instantiate BasicBlockAnnotator for a script that is never shown.

I&apos;m experimenting with instantiating BasicBlockAnnotator in SourceCodeTextEditor#shown instead of SourceCodeTextEditor#_proceedPopulateWithContent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252169</commentid>
    <comment_count>7</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-11-16 18:51:40 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; The problem is that we instantiate BasicBlockAnnotator for a script that is
&gt; never shown.
&gt; 
&gt; I&apos;m experimenting with instantiating BasicBlockAnnotator in
&gt; SourceCodeTextEditor#shown instead of
&gt; SourceCodeTextEditor#_proceedPopulateWithContent.

Could you clarify what you mean here? A SourceCodeTextEditor is created, presumably it is shown. If its `shown` is not called, would calling it, and ensuring it gets the normal shown/hidden life cycle be a suitable fix?

If `shown` is not getting called, it seems like just changing where the Annotator is created, might fix this but paste over other issues that would be solved by a proper `shown`/`hidden` life cycle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252181</commentid>
    <comment_count>8</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-16 19:36:08 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; The problem is that we instantiate BasicBlockAnnotator for a script that is
&gt; never shown.
&gt; 
&gt; I&apos;m experimenting with instantiating BasicBlockAnnotator in
&gt; SourceCodeTextEditor#shown instead of
&gt; SourceCodeTextEditor#_proceedPopulateWithContent.

This didn&apos;t fix anything. `shown` IS in fact getting called.

The problem is that `hidden` isn&apos;t getting called.

In ContentViewContainer#showBackForwardEntryForIndex there&apos;s this code:

            if (previousEntry)
                this._hideEntry(previousEntry);

If we don&apos;t store a resource as a backForwardEntry, it doesn&apos;t get `hidden`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252900</commentid>
    <comment_count>9</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-18 15:29:30 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #6)
&gt; &gt; The problem is that we instantiate BasicBlockAnnotator for a script that is
&gt; &gt; never shown.
&gt; &gt; 
&gt; &gt; I&apos;m experimenting with instantiating BasicBlockAnnotator in
&gt; &gt; SourceCodeTextEditor#shown instead of
&gt; &gt; SourceCodeTextEditor#_proceedPopulateWithContent.
&gt; 
&gt; This didn&apos;t fix anything. `shown` IS in fact getting called.
&gt; 
&gt; The problem is that `hidden` isn&apos;t getting called.
&gt; 
&gt; In ContentViewContainer#showBackForwardEntryForIndex there&apos;s this code:
&gt; 
&gt;             if (previousEntry)
&gt;                 this._hideEntry(previousEntry);
&gt; 
&gt; If we don&apos;t store a resource as a backForwardEntry, it doesn&apos;t get `hidden`.

My assumption was wrong. We do store a resource as a backForwardEntry, but on a ContentViewContainer of an inactive tab. A ContentViewContainer that was never visible. In my case, Debugger tab&apos;s ContentViewContainer (I had Resources tab selected). Here&apos;s where this ContentViewContainer was instantiated:

    ContentViewContainer@ContentViewContainer.js:37:14
    ContentBrowser@ContentBrowser.js:37:75
    ContentBrowserTabContentView@ContentBrowserTabContentView.js:35:61
    DebuggerTabContentView@DebuggerTabContentView.js:34:14
    _createTabContentViewForType@Main.js:528:24
    contentLoaded@Main.js:454:63
    [native code]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252922</commentid>
    <comment_count>10</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-18 16:02:05 -0800</bug_when>
    <thetext>This regressed 12 months ago in https://trac.webkit.org/changeset/192344.
Bug 151149: Web Inspector: blank debugger tab when opening inspector on unvisited website</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252993</commentid>
    <comment_count>11</comment_count>
      <attachid>295237</attachid>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-11-18 17:47:36 -0800</bug_when>
    <thetext>Created attachment 295237
Patch

In the future, we may want to make our view code less prone to errors related to visibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255479</commentid>
    <comment_count>12</comment_count>
      <attachid>295237</attachid>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2016-12-01 14:22:25 -0800</bug_when>
    <thetext>Comment on attachment 295237
Patch

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

&gt; Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:475
&gt; +        }

It might be good to break this out into a helper function since it&apos;s used identically in two places.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255584</commentid>
    <comment_count>13</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2016-12-01 17:32:59 -0800</bug_when>
    <thetext>Should this check be performed in NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement? Potential side-effects should be considered, but it seems that not showing content views when the sidebar&apos;s content browser is hidden is the right thing to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255787</commentid>
    <comment_count>14</comment_count>
      <attachid>295971</attachid>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2016-12-02 11:42:36 -0800</bug_when>
    <thetext>Created attachment 295971
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255833</commentid>
    <comment_count>15</comment_count>
      <attachid>295971</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-12-02 12:59:23 -0800</bug_when>
    <thetext>Comment on attachment 295971
Patch

Clearing flags on attachment: 295971

Committed r209257: &lt;http://trac.webkit.org/changeset/209257&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255834</commentid>
    <comment_count>16</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-12-02 12:59:27 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>295237</attachid>
            <date>2016-11-18 17:47:36 -0800</date>
            <delta_ts>2016-12-02 11:42:36 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>2766</size>
            <attacher name="Nikita Vasilyev">nvasilyev</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCmluZGV4IDZjZDBjNmMuLjUzMzZmNzMgMTAwNjQ0Ci0tLSBh
L1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkluc3BlY3Rv
clVJL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDE2LTExLTE4ICBOaWtpdGEgVmFzaWx5
ZXYgIDxudmFzaWx5ZXZAYXBwbGUuY29tPgorCisgICAgICAgIFJFR1JFU1NJT04gKHIxOTIzNDQp
OiBXZWIgSW5zcGVjdG9yOiBUdXJuaW5nIG9mZiBDb2RlIENvdmVyYWdlIG9yIFR5cGUgUHJvZmls
ZXIgbG9ncyBhbiBlcnJvcgorICAgICAgICBodHRwczovL2J1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blJlc291cmNl
RGlkQ2hhbmdlKGV2ZW50KQpAQCAtNTQyLDggKzU0NiwxMiBAQCBXZWJJbnNwZWN0b3IuRGVidWdn
ZXJTaWRlYmFyUGFuZWwgPSBjbGFzcyBEZWJ1Z2dlclNpZGViYXJQYW5lbCBleHRlbmRzIFdlYklu
c3BlYwogICAgICAgICB0aGlzLl9hZGRCcmVha3BvaW50c0ZvclNvdXJjZUNvZGUoc2NyaXB0KTsK
ICAgICAgICAgdGhpcy5fYWRkSXNzdWVzRm9yU291cmNlQ29kZShzY3JpcHQpOwogCi0gICAgICAg
IGlmICghdGhpcy5jb250ZW50QnJvd3Nlci5jdXJyZW50Q29udGVudFZpZXcpCi0gICAgICAgICAg
ICB0aGlzLnNob3dEZWZhdWx0Q29udGVudFZpZXdGb3JUcmVlRWxlbWVudCh0cmVlRWxlbWVudCk7
CisgICAgICAgIGlmICghdGhpcy5jb250ZW50QnJvd3Nlci5jdXJyZW50Q29udGVudFZpZXcpIHsK
KyAgICAgICAgICAgIC8vIE1ha2Ugc3VyZSB3ZSBhcmUgaW4gdGhlIERlYnVnZ2VyIHRhYi4KKyAg
ICAgICAgICAgIGxldCBzZWxlY3RlZFRhYkNvbnRlbnRWaWV3ID0gV2ViSW5zcGVjdG9yLnRhYkJy
b3dzZXIuc2VsZWN0ZWRUYWJDb250ZW50VmlldzsKKyAgICAgICAgICAgIGlmIChzZWxlY3RlZFRh
YkNvbnRlbnRWaWV3ICYmIHNlbGVjdGVkVGFiQ29udGVudFZpZXcuY29udGVudEJyb3dzZXIgPT09
IHRoaXMuY29udGVudEJyb3dzZXIpCisgICAgICAgICAgICAgICAgdGhpcy5zaG93RGVmYXVsdENv
bnRlbnRWaWV3Rm9yVHJlZUVsZW1lbnQodHJlZUVsZW1lbnQpOworICAgICAgICB9CiAKICAgICAg
ICAgcmV0dXJuIHRyZWVFbGVtZW50OwogICAgIH0K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>295971</attachid>
            <date>2016-12-02 11:42:36 -0800</date>
            <delta_ts>2016-12-02 12:59:23 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>2115</size>
            <attacher name="Nikita Vasilyev">nvasilyev</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCmluZGV4IDZjZDBjNmMuLmNiZmJkY2IgMTAwNjQ0Ci0tLSBh
L1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkluc3BlY3Rv
clVJL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDE2LTEyLTAyICBOaWtpdGEgVmFzaWx5
ZXYgIDxudmFzaWx5ZXZAYXBwbGUuY29tPgorCisgICAgICAgIFJFR1JFU1NJT04gKHIxOTIzNDQp
OiBXZWIgSW5zcGVjdG9yOiBUdXJuaW5nIG9mZiBDb2RlIENvdmVyYWdlIG9yIFR5cGUgUHJvZmls
ZXIgbG9ncyBhbiBlcnJvcgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9MTY0ODA0CisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS8yOTI3ODAyOD4KKworICAg
ICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBCYXNpY0Jsb2NrQW5u
b3RhdG9yIGFuZCBUeXBlVG9rZW5Bbm5vdGF0b3Igd2VyZSBpbnN0YW5jaWF0ZWQgZm9yIGEgcmVz
b3VyY2UgaW4gYW4gaW5hY3RpdmUgRGVidWdnZXIgdGFiLgorCisgICAgICAgICogVXNlckludGVy
ZmFjZS9WaWV3cy9OYXZpZ2F0aW9uU2lkZWJhclBhbmVsLmp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RlZE9iamVjdCh0cmVlRWxlbWVu
dC5yZXByZXNlbnRlZE9iamVjdCk7CiAgICAgICAgICAgICBpZiAoY29udGVudFZpZXcgJiYgY29u
dGVudFZpZXcucGFyZW50Q29udGFpbmVyICYmIGNvbnRlbnRWaWV3LnBhcmVudENvbnRhaW5lciAh
PT0gdGhpcy5jb250ZW50QnJvd3Nlci5jb250ZW50Vmlld0NvbnRhaW5lcikKICAgICAgICAgICAg
ICAgICByZXR1cm4gZmFsc2U7CisKKyAgICAgICAgICAgIC8vIGNvbnRlbnRWaWV3LnBhcmVudENv
bnRhaW5lciBtYXkgYmUgbnVsbC4gQ2hlY2sgZm9yIHNlbGVjdGVkIHRhYiwgdG9vLgorICAgICAg
ICAgICAgbGV0IHNlbGVjdGVkVGFiQ29udGVudFZpZXcgPSBXZWJJbnNwZWN0b3IudGFiQnJvd3Nl
ci5zZWxlY3RlZFRhYkNvbnRlbnRWaWV3OworICAgICAgICAgICAgaWYgKHNlbGVjdGVkVGFiQ29u
dGVudFZpZXcgJiYgc2VsZWN0ZWRUYWJDb250ZW50Vmlldy5jb250ZW50QnJvd3NlciAhPT0gdGhp
cy5jb250ZW50QnJvd3NlcikKKyAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAg
IH0KIAogICAgICAgICBsZXQgY29udGVudFZpZXcgPSB0aGlzLmNvbnRlbnRCcm93c2VyLnNob3dD
b250ZW50Vmlld0ZvclJlcHJlc2VudGVkT2JqZWN0KHRyZWVFbGVtZW50LnJlcHJlc2VudGVkT2Jq
ZWN0KTsK
</data>

          </attachment>
      

    </bug>

</bugzilla>