Closed
Bug 1129336
Opened 10 years ago
Closed 10 years ago
Remove nonstandard let blocks from testing/xpcshell
Categories
(Testing :: XPCShell Harness, defect)
Tracking
(firefox38 fixed)
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file, 1 obsolete file)
3.09 KB,
patch
|
chmanchester
:
review+
|
Details | Diff | Splinter Review |
let blocks are a nonstandard SpiderMonkey feature we would like to remove (in bug 1023609). This patch removes the let blocks in the testing/ subtree.
The attached patch excludes whitespace changes because most of the patch is unindenting blocks of unchanged code from the removed let blocks. This made the important bits of the patch harder to review.
Attachment #8558998 -
Flags: review?(cmanchester)
Comment 1•10 years ago
|
||
Comment on attachment 8558998 [details] [diff] [review]
testing-xpcshell.patch
Review of attachment 8558998 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/xpcshell/head.js
@@ +52,5 @@
> // not connected to a network.
> +let ios2 = Components.classes["@mozilla.org/network/io-service;1"]
> + .getService(Components.interfaces.nsIIOService2);
> +ios2.manageOfflineStatus = false;
> +ios2.offline = false;
Top level declarations in xpcshell/head.js are exposed to every test file, so if nonstandard let blocks work the way I expect, this introduces a new variable we'd probably rather keep hidden.
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #1)
> Top level declarations in xpcshell/head.js are exposed to every test file,
> so if nonstandard let blocks work the way I expect, this introduces a new
> variable we'd probably rather keep hidden.
OK. I can change this code to hide the ios variable in a no-op {} block or an IIFE.
Comment 3•10 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #2)
> (In reply to Chris Manchester [:chmanchester] from comment #1)
> > Top level declarations in xpcshell/head.js are exposed to every test file,
> > so if nonstandard let blocks work the way I expect, this introduces a new
> > variable we'd probably rather keep hidden.
>
> OK. I can change this code to hide the ios variable in a no-op {} block or
> an IIFE.
A no-op {} block would be ok with me!
Assignee | ||
Comment 4•10 years ago
|
||
Patch v2: unfold the `let (ios = ...)` let block into a no-op {} block instead of renaming `ios` to `ios2`.
Attachment #8558998 -
Attachment is obsolete: true
Attachment #8558998 -
Flags: review?(cmanchester)
Attachment #8559643 -
Flags: review?(cmanchester)
Updated•10 years ago
|
Attachment #8559643 -
Flags: review?(cmanchester) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•