[Webkit-unassigned] [Bug 113607] REGRESSION(r146840): At breakpoints, inspector's "this" refers to JavaScriptCallFrame

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 1 11:15:35 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=113607


Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #195834|review?                     |review+
               Flag|                            |




--- Comment #3 from Joseph Pecoraro <joepeck at webkit.org>  2013-04-01 11:13:47 PST ---
(From update of attachment 195834)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list