Bug 184630 - Function.prototype.caller shouldn't return generator bodies
Summary: Function.prototype.caller shouldn't return generator bodies
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-14 13:07 PDT by Filip Pizlo
Modified: 2018-04-15 10:39 PDT (History)
7 users (show)

See Also:


Attachments
the patch (8.91 KB, patch)
2018-04-14 13:08 PDT, Filip Pizlo
ysuzuki: review+
Details | Formatted Diff | Diff
patch for landing (10.51 KB, patch)
2018-04-14 13:23 PDT, Filip Pizlo
ews: commit-queue-
Details | Formatted Diff | Diff
patch for landing (12.33 KB, patch)
2018-04-15 09:12 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2018-04-14 13:07:39 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2018-04-14 13:08:54 PDT
Created attachment 337961 [details]
the patch
Comment 2 Yusuke Suzuki 2018-04-14 13:12:03 PDT
Comment on attachment 337961 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=337961&action=review

r=me, nice.

> JSTests/stress/function-caller-generator-body.js:24
> +})();

Can you add a test for,

1. Async functions, which uses generators internally
2. generator method functions like

class A {
    *gen() {
        ...
    }
}

var a = new A();
var gen = a.gen();
Comment 3 Filip Pizlo 2018-04-14 13:12:43 PDT
(In reply to Yusuke Suzuki from comment #2)
> Comment on attachment 337961 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=337961&action=review
> 
> r=me, nice.
> 
> > JSTests/stress/function-caller-generator-body.js:24
> > +})();
> 
> Can you add a test for,
> 
> 1. Async functions, which uses generators internally
> 2. generator method functions like
> 
> class A {
>     *gen() {
>         ...
>     }
> }
> 
> var a = new A();
> var gen = a.gen();

Good idea, will do.
Comment 4 Filip Pizlo 2018-04-14 13:23:25 PDT
Created attachment 337962 [details]
patch for landing
Comment 5 Build Bot 2018-04-14 14:38:39 PDT
Comment on attachment 337962 [details]
patch for landing

Attachment 337962 [details] did not pass jsc-ews (mac):
Output: http://webkit-queues.webkit.org/results/7317590

New failing tests:
stress/function-caller-async-function-body.js.default
Comment 6 Filip Pizlo 2018-04-15 09:12:43 PDT
Created attachment 337972 [details]
patch for landing
Comment 7 Filip Pizlo 2018-04-15 10:38:20 PDT
Landed in https://trac.webkit.org/changeset/230662/webkit
Comment 8 Radar WebKit Bug Importer 2018-04-15 10:39:18 PDT
<rdar://problem/39443234>