Closed
Bug 1210295
Opened 10 years ago
Closed 10 years ago
Simplify TOK_DEFAULT case in Parser::exportDeclaration.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
1.91 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
https://dxr.mozilla.org/mozilla-central/rev/97e537f85183ef31481602ab9e5587a6e7d16b4d/js/src/frontend/Parser.cpp#4967
> ParseNode* binding = nullptr;
> switch (tt) {
> case TOK_FUNCTION:
> kid = functionStmt(YieldIsKeyword, AllowDefaultName);
> break;
> case TOK_CLASS:
> kid = classDefinition(YieldIsKeyword, ClassStatement, AllowDefaultName);
> break;
> default:
> tokenStream.ungetToken();
> RootedPropertyName name(context, context->names().starDefaultStar);
> binding = makeInitializedLexicalBinding(name, true, pos());
> if (!binding)
> return null();
> kid = assignExpr(InAllowed, YieldIsKeyword);
> if (kid) {
> if (!MatchOrInsertSemicolonAfterExpression(tokenStream))
> return null();
> }
> break;
> }
> if (!kid)
> return null();
It's a little confusing that placing |if (!kid)| after |if (kid)|.
Assignee | ||
Comment 1•10 years ago
|
||
Moved |if (!kid)| to each case.
Assignee: nobody → arai.unmht
Attachment #8668275 -
Flags: review?(jwalden+bmo)
Updated•10 years ago
|
Attachment #8668275 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 2•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/054abc8d92d84c5b7d840dffa1a471f580823d78
Bug 1210295 - Simplify TOK_DEFAULT case in Parser::exportDeclaration. r=Waldo
Comment 3•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•