Patch to follow.
Created attachment 184455 [details] Patch
Comment on attachment 184455 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184455&action=review > Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js:236 > + Error.prepareStackTrace = function(error, structuredStackTrace) Error is a part of the page's context. Why do you need to intercept it?
(In reply to comment #2) > (From update of attachment 184455 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=184455&action=review > > > Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js:236 > > + Error.prepareStackTrace = function(error, structuredStackTrace) > > Error is a part of the page's context. Why do you need to intercept it? The canvas calls are also made from the page's context. We want the stack trace of those calls. To get it, we use V8's http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi, namely Error.prepareStackTrace method.
Comment on attachment 184455 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184455&action=review >>> Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js:236 >>> + Error.prepareStackTrace = function(error, structuredStackTrace) >> >> Error is a part of the page's context. Why do you need to intercept it? > > The canvas calls are also made from the page's context. We want the stack trace of those calls. To get it, we use V8's http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi, namely Error.prepareStackTrace method. We should not modify user functions if at all possible. Can we use a binding for this?
Committed r140679: <http://trac.webkit.org/changeset/140679>