Summary: | REGRESSION(r146840): At breakpoints, inspector's "this" refers to JavaScriptCallFrame | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vicki Pfau <jeffrey+webkit> | ||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | graouts, joepeck, timothy, webkit-bug-importer, webkit.review.bot | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Vicki Pfau
2013-03-29 13:52:50 PDT
Created attachment 195834 [details]
Proposed Change
Comment on attachment 195834 [details] Proposed Change View in context: https://bugs.webkit.org/attachment.cgi?id=195834&action=review Change looks good. It might be nice to create a test for this. > Source/WebCore/inspector/InjectedScriptSource.js:583 > + // Bind 'this' to the function expression using another closure instead of Function.prototype.bind. This ensures things will work if the page replaces bind. > + var boundExpressionFunctionString = "(function(__function, __thisObject) { return function() { return __function.apply(__thisObject, arguments) }; })(" + expressionFunctionString + ", this)"; > + var expressionFunction = evalFunction.call(object, boundExpressionFunctionString); > + var result = expressionFunction.apply(null, parameters); Hmm, there are uses of Function.prototype.apply and Function.prototype.call here which can be overridden by the page. We may need to look into providing those from the backend like evalFunction. Comment on attachment 195834 [details] Proposed Change Clearing flags on attachment: 195834 Committed r147356: <http://trac.webkit.org/changeset/147356> All reviewed patches have been landed. Closing bug. |