DevTool relies on mutable __defineGetter__ and co.
Reported by
car...@gmail.com,
Mar 10 2016
|
||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Steps to reproduce the problem:
1. Open devtool console
2. Evaluate this snipped to bleach out few methods of Object.prototype:
```
Object.defineProperty(Object.prototype, '__defineGetter__', {
value: null
});
Object.defineProperty(Object.prototype, '__defineSetter__', {
value: null
});
```
3. try to inspect any global variable, or define new one, e.g.:
```
f = 1
```
What is the expected behavior?
`f` should be define.
What went wrong?
Uncaught TypeError: this.__defineGetter__ is not a function
Did this work before? N/A
Chrome version: 48.0.2564.116 Channel: stable
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 21.0 r0
Safari DevTool suffers from the same issue, FF works fine.
Proposal: rely on `SafeBuiltins` for any operation.
,
Mar 14 2016
,
Mar 14 2016
We discussed this with Aleksey and tentatively agreed on making turning $0..$9 into functions and calling them from the command line api bindings instead.
,
Mar 14 2016
,
Mar 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f48b656630e08f24394cf69fea53b4fd2ae0f59f commit f48b656630e08f24394cf69fea53b4fd2ae0f59f Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Tue Mar 15 01:09:02 2016 [DevTools] Removed __defineGetter__ from InjectedScriptSource.js All Command Line API methods were splitted into common methods and getters methods. V8WindowCustom binding calls getters method by itself. Check of existance Command Line API method on global object can be removed from inScopeVariable function inside constructor because V8CustomBinding wouldn't be called if it's redefined by users. BUG= 593537 R=dgozman@chromium.org, pfeldman@chromium.org Review URL: https://codereview.chromium.org/1798143002 Cr-Commit-Position: refs/heads/master@{#381143} [modify] https://crrev.com/f48b656630e08f24394cf69fea53b4fd2ae0f59f/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp [modify] https://crrev.com/f48b656630e08f24394cf69fea53b4fd2ae0f59f/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js [modify] https://crrev.com/f48b656630e08f24394cf69fea53b4fd2ae0f59f/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp [modify] https://crrev.com/f48b656630e08f24394cf69fea53b4fd2ae0f59f/third_party/WebKit/Source/platform/v8_inspector/public/V8Debugger.h
,
Mar 15 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by car...@gmail.com
, Mar 10 2016