Uncaught Exception: TypeError: this.positionToOffset is not a function - seen hoverin...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Oct 2016 07:10:00 +0000 (07:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Oct 2016 07:10:00 +0000 (07:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163405
<rdar://problem/28763953>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Matt Baker.

* UserInterface/Views/SourceCodeTextEditor.js:
Use correct method name, the old one must have gone away.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207329 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js

index bea6718..ecaee45 100644 (file)
@@ -1,3 +1,14 @@
+2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Uncaught Exception: TypeError: this.positionToOffset is not a function - seen hovering expressions with Type Profiler enabled
+        https://bugs.webkit.org/show_bug.cgi?id=163405
+        <rdar://problem/28763953>
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/SourceCodeTextEditor.js:
+        Use correct method name, the old one must have gone away.
+
 2016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Improve support for logging Proxy objects in console
index a782908..89c99af 100644 (file)
@@ -1516,7 +1516,7 @@ WebInspector.SourceCodeTextEditor = class SourceCodeTextEditor extends WebInspec
         var sourceCode = this._sourceCode;
         var sourceID = sourceCode instanceof WebInspector.Script ? sourceCode.id : sourceCode.scripts[0].id;
         var range = candidate.hoveredTokenRange;
-        var offset = this.positionToOffset({line: range.start.line, ch: range.start.ch});
+        var offset = this.currentPositionToOriginalOffset(range.start);
 
         var allRequests = [{
             typeInformationDescriptor: WebInspector.ScriptSyntaxTree.TypeProfilerSearchDescriptor.NormalExpression,