Bug 53018 - Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'
Summary: Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on: 53164
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-24 09:02 PST by Mikhail Naganov
Modified: 2011-01-26 03:30 PST (History)
13 users (show)

See Also:


Attachments
sample page (291 bytes, text/html)
2011-01-24 09:02 PST, Mikhail Naganov
no flags Details
Safari screenshot (111.26 KB, image/png)
2011-01-24 09:03 PST, Mikhail Naganov
no flags Details
[PATCH] Proposed change. (26.08 KB, patch)
2011-01-25 08:41 PST, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Naganov 2011-01-24 09:02:57 PST
Created attachment 79932 [details]
sample page

If I have a local variable named 'profile', it's being incorrectly evaluated as 'function profile' in the yellow on-hover popup appearing in Debugger.

Reproducible both in Safari and Chrome.
Comment 1 Mikhail Naganov 2011-01-24 09:03:41 PST
Created attachment 79933 [details]
Safari screenshot
Comment 2 Pavel Feldman 2011-01-25 08:41:43 PST
Created attachment 80067 [details]
[PATCH] Proposed change.
Comment 3 Yury Semikhatsky 2011-01-25 23:56:32 PST
Comment on attachment 80067 [details]
[PATCH] Proposed change.

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

I'd really appreciate if you wrote a test for this fix.

> Source/WebCore/inspector/front-end/ScriptsPanel.js:328
>          var self = this;

Can you bind the function below to "this" object instead like we do with other callbacks.
Comment 4 Pavel Feldman 2011-01-26 02:20:24 PST
Committed r76680: <http://trac.webkit.org/changeset/76680>
Comment 5 WebKit Review Bot 2011-01-26 03:00:14 PST
http://trac.webkit.org/changeset/76680 might have broken Qt Linux Release
The following tests are not passing:
http/tests/inspector/console-resource-errors.html
http/tests/inspector/extensions-headers.html
http/tests/inspector/extensions-resources-redirect.html
inspector/console-command-clear.html
inspector/console-dir-global.html
inspector/console-dir.html
inspector/console-format.html
inspector/console-object-constructor-name.html
inspector/console-uncaught-exception-in-eval.html
inspector/console-uncaught-exception.html
inspector/cookie-parser.html
inspector/cpu-profiler-profiling.html
inspector/debugger-autocontinue-on-syntax-error.html
inspector/debugger-scripts.html
inspector/debugger-suspend-active-dom-objects.html
inspector/elements-delete-inline-style.html
inspector/extensions-api.html
inspector/extensions-audits-api.html
inspector/extensions-audits.html
inspector/extensions-eval.html
inspector/extensions-events.html
inspector/extensions-resources.html
inspector/report-API-errors.html
inspector/report-protocol-errors.html
inspector/storage-panel-dom-storage.html
inspector/styles-disable-then-change.html
inspector/styles-url-linkify.html