Bug 34089 - Web Inspector overrides methods defined by the inspected application
Summary: Web Inspector overrides methods defined by the inspected application
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
Depends on:
Reported: 2010-01-25 08:34 PST by Yury Semikhatsky
Modified: 2010-01-25 10:57 PST (History)
3 users (show)

See Also:

patch (11.38 KB, patch)
2010-01-25 08:43 PST, Yury Semikhatsky
timothy: review-
Details | Formatted Diff | Diff
patch (10.59 KB, patch)
2010-01-25 10:34 PST, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2010-01-25 08:34:47 PST
Web Inspector shouldn't override methods defined by the inspected application. Currently Web Inspector provides its own implementation for 
Comment 1 Timothy Hatcher 2010-01-25 08:36:44 PST
Just to be clear, we shoulnt use the page's version if it exists. We need to namespace our own.
Comment 2 Yury Semikhatsky 2010-01-25 08:43:31 PST
Created attachment 47349 [details]
Comment 3 Timothy Hatcher 2010-01-25 08:47:08 PST
Comment on attachment 47349 [details]

All the new "InjectedScript." calls should be "this.".
Comment 4 Pavel Feldman 2010-01-25 08:59:55 PST
Comment on attachment 47349 [details]

Please remove // throw ... comment.
Also, do not dump dom tree here - your test should be local to the problem.

Wrt InjectedScript. vs this., I am not sure. I'd do that when we migrate to the prototype-based implementation of InjectedScript's functions.
Comment 5 Yury Semikhatsky 2010-01-25 10:34:49 PST
Created attachment 47356 [details]

- Removed commented code.
- Removed DOM tree dump.
- I'd rather keep the new calls to InjectedScript methods with InjectedScript. prefix because they are "static" routines, i.e. they don't depend on the state of "this". Also if we want to use "this" in InjectedScript methods I'd convert it into prototype based implementation to be consistent with the rest if the code.
Comment 6 WebKit Commit Bot 2010-01-25 10:57:46 PST
Comment on attachment 47356 [details]

Clearing flags on attachment: 47356

Committed r53807: <http://trac.webkit.org/changeset/53807>
Comment 7 WebKit Commit Bot 2010-01-25 10:57:51 PST
All reviewed patches have been landed.  Closing bug.