If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Revert load() to be cwd-relative, add loadRelativeToScript()

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: sfink, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Bug 835552 broke sunspider, and doesn't match other JS shells. This bug will revert the load() part, but still add ways to do things script-relative.
Vindication! :P
(Reporter)

Comment 2

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/028b8d687387
Hmm:

  Bug 853541 - Partially revert bug 835552, making load() be cwd-relative again. r=njn 

What you landed looks fine, but I probably would have asked for review on a patch like this.  No biggie.
(Reporter)

Comment 4

5 years ago
err... oops, my faulty memory said that I already did that. From you, even. When in fact, it looks like I never even uploaded a patch here.

Uh... would you mind doing a post-facto review? This really should have a review, and I'm not at all sure it'll pass without comments. I'm tempted to back it out, in fact, but OTOH I don't want to introduc yet more churn.
(Reporter)

Comment 5

5 years ago
Created attachment 729244 [details] [diff] [review]
Partially revert bug 835552, making load() be cwd-relative again.

This patch also fixes an ASan error where I was strcpy'ing an address to itself.
Attachment #729244 - Flags: review?(n.nethercote)
Comment on attachment 729244 [details] [diff] [review]
Partially revert bug 835552, making load() be cwd-relative again.

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

Honest mistake;  don't bother backing it out.

::: js/src/shell/js.cpp
@@ +843,5 @@
> +    return LoadScript(cx, argc, vp, false);
> +}
> +
> +static JSBool
> +LoadScriptRelativeToScript(JSContext *cx, unsigned argc, jsval *vp)

Nit: I'd call this LoadRelativeToScript, to match loadRelativeToScript.
Attachment #729244 - Flags: review?(n.nethercote) → review+
(Assignee)

Updated

3 years ago
Assignee: general → nobody
(Reporter)

Comment 7

2 years ago
Landed long ago as 028b8d687387
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.