Web Inspector: Inspector Scripts evaluated in the page should not be searchable
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jun 2015 05:11:49 +0000 (05:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jun 2015 05:11:49 +0000 (05:11 +0000)
commit21dce2a69f08954af3fee7194b7f76188766bb48
treee45e2a4f73687d3e2c2dca0dc370ab04fdf790e9
parenta6e18169267b043b9bfb8dd75b0048c3931e4160
Web Inspector: Inspector Scripts evaluated in the page should not be searchable
https://bugs.webkit.org/show_bug.cgi?id=146040

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-16
Reviewed by Darin Adler.

Any script with a __WebInspector source URL will be hidden by the tools.
There were a number of ways the inspector could evaluate script on the page
without getting the sourceURL and therefore not getting hidden. Audit
all cases of Runtime.evaluate, Runtime.callFunctionOn, and
Debugger.evaluateOnCallFrame, to ensure we have an appropriate source URL.

* UserInterface/Base/Utilities.js:
(appendWebInspectorSourceURL):
Helper to append a __WebInspectorInternal__ sourceURL to a string that may
be evaluated directly on the inspected context.

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.domNodeResolved):
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted): Deleted.
* UserInterface/Controllers/RuntimeManager.js:
* UserInterface/Models/DOMTree.js:
(WebInspector.DOMTree.prototype._requestRootDOMNode):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
Ensure all cases that evaluate directly on the inspected page / context
have the intenral source URL.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Utilities.js
Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js
Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js
Source/WebInspectorUI/UserInterface/Models/DOMTree.js
Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js
Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js