Closed Bug 914309 Opened 6 years ago Closed 6 years ago

Cleanup rooting in Parser::objectLiteral() a bit

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(1 file)

No description provided.
Comment on attachment 801732 [details] [diff] [review]
Factor out fromMarkedLocation calls in Parser::objectLiteral() into a helper function;

Review of attachment 801732 [details] [diff] [review]:
-----------------------------------------------------------------

It's not a good idea to return the address of a local variable in C++.
Attachment #801732 - Flags: review?(jorendorff) → review-
Comment on attachment 801732 [details] [diff] [review]
Factor out fromMarkedLocation calls in Parser::objectLiteral() into a helper function;

Review of attachment 801732 [details] [diff] [review]:
-----------------------------------------------------------------

I am dumb.

::: js/src/frontend/Parser.cpp
@@ +6520,5 @@
> +static JSAtom*
> +DoubleToAtom(ExclusiveContext *cx, double value)
> +{
> +    Value tmp = DoubleValue(value);
> +    // This is safe because doubles can not be moved.

SpiderMonkey house still micro-nit: Either put the comment first, or put a blank line before it.
Attachment #801732 - Flags: review- → review+
https://hg.mozilla.org/mozilla-central/rev/be1053dc223b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.