RESOLVED FIXED 34161
Local scope is shown as With scope in scope chain pane
https://bugs.webkit.org/show_bug.cgi?id=34161
Summary Local scope is shown as With scope in scope chain pane
Yury Semikhatsky
Reported 2010-01-26 04:40:48 PST
When debugger is paused on a breakpoint Local scope is displayed as With scope and 'this' variable is missing in it. This is a regression after http://trac.webkit.org/changeset/53766
Attachments
patch (3.39 KB, patch)
2010-01-27 08:23 PST, Yury Semikhatsky
no flags
patch (4.46 KB, patch)
2010-01-27 08:34 PST, Yury Semikhatsky
no flags
patch (1.52 KB, patch)
2010-01-28 01:06 PST, Yury Semikhatsky
no flags
Oliver Hunt
Comment 1 2010-01-26 12:17:15 PST
Any word on this?
Oliver Hunt
Comment 2 2010-01-26 12:25:20 PST
This only happens if the global object has a property with the same name of a variable in the scope chain :-/
Yury Semikhatsky
Comment 3 2010-01-27 08:23:24 PST
Yury Semikhatsky
Comment 4 2010-01-27 08:34:33 PST
Created attachment 47539 [details] patch Added ChangeLog entry.
Oliver Hunt
Comment 5 2010-01-27 08:36:05 PST
Comment on attachment 47539 [details] patch r=me
Yury Semikhatsky
Comment 6 2010-01-27 11:30:51 PST
Comment on attachment 47539 [details] patch Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/bindings/js/JSInjectedScriptHostCustom.cpp M WebCore/inspector/InjectedScriptHost.idl M WebCore/inspector/front-end/InjectedScript.js A WebCore/manual-tests/inspector/debugger-scopes-inspection.html Committed r53945
Darin Adler
Comment 7 2010-01-27 12:48:35 PST
Comment on attachment 47539 [details] patch > +JSValue JSInjectedScriptHost::isActivation(ExecState* exec, const ArgList& args) > +{ > + if (args.size() < 1) > + return jsUndefined(); > + > + JSValue value = args.at(0); > + if (!value.isObject()) > + return jsBoolean(false); > + > + JSObject* object = value.toObject(exec); > + return jsBoolean(object->isActivationObject()); This is unnecessarily inefficient. There is no need to check args.size() at all, since args.at(0) already does. And the toObject function is not needed for a value already known to be an object. The function could be this: JSObject* object = args.at(0).getObject(); return jsBoolean(object && object->isActivationObject());
Yury Semikhatsky
Comment 8 2010-01-28 01:06:16 PST
Created attachment 47598 [details] patch isActivation code is simplified according to Darin's suggestion.
Yury Semikhatsky
Comment 9 2010-01-28 01:06:58 PST
I'd like to improve the code.
WebKit Commit Bot
Comment 10 2010-01-28 02:46:33 PST
Comment on attachment 47598 [details] patch Clearing flags on attachment: 47598 Committed r53993: <http://trac.webkit.org/changeset/53993>
WebKit Commit Bot
Comment 11 2010-01-28 02:46:40 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.