Ignore:
Timestamp:
Oct 5, 2021, 10:20:07 PM (4 years ago)
Author:
[email protected]
Message:

Don't pass DontBuildStrings to next token after parsing an empty parameter list
https://bugs.webkit.org/show_bug.cgi?id=225094
<rdar://problem/77231778>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dont-pass-DontBuildStrings-when-building-empty-arguments-list.js: Added.

(main.a.prototype.g.toString.string_appeared_here):
(main.a):
(main):

Source/JavaScriptCore:

We might need the string, it turns out!

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseArguments):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r282968 r283600  
    49814981    JSTokenLocation location(tokenLocation());
    49824982    if (match(CLOSEPAREN)) {
    4983         next(TreeBuilder::DontBuildStrings);
     4983        next();
    49844984        return context.createArguments();
    49854985    }
Note: See TracChangeset for help on using the changeset viewer.