Bug 11884

Summary: FunctionProtoFunc::callAsFunction uses the wrong global object as 'this' in the apply case
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, barraclough, ddkilzer, jwalden+bwo, oliver, sam
Priority: P2 Keywords: InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
reduction none

Description Geoffrey Garen 2006-12-19 16:05:19 PST
See attached test case.
Comment 1 Geoffrey Garen 2006-12-19 16:06:12 PST
Created attachment 11925 [details]
reduction
Comment 2 Geoffrey Garen 2006-12-19 16:06:46 PST
We should probably analyze what we use for the global object in other cases, as well.
Comment 3 Geoffrey Garen 2006-12-19 16:09:25 PST
You have to open the reduction locally, to avoid a JavaScript security exception. See bug 11885.
Comment 4 Alexey Proskuryakov 2006-12-19 21:22:23 PST
Is this the same as bug 7831?
Comment 5 Geoffrey Garen 2006-12-20 00:48:47 PST
I think bug 7831 is specifically about eval.apply, and not about apply in general, or multiple global objects. It's possible that fixing one may fix the other, though.
Comment 6 David Kilzer (:ddkilzer) 2008-02-20 06:33:31 PST
<rdar://problem/5754363>
Comment 7 Oliver Hunt 2008-06-28 03:47:29 PDT
Sam, this page succeeds in ffx3, but fails with a security check failure in ToT
Comment 8 Sam Weinig 2008-06-28 09:01:56 PDT
We have different rules than Firefox regarding data: urls (we are much more strict).  It doesn't seem like that is what this test is really testing though.  To do the real test, just put the content from the data: url into its own file.

Comment 9 Gavin Barraclough 2011-12-25 15:49:26 PST

*** This bug has been marked as a duplicate of bug 64250 ***