The default bug view has changed. See this FAQ.

Preprocessor.py -Fslashslash does'nt work

RESOLVED FIXED in mozilla19

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: teramako, Assigned: Taro Matsuzawa)

Tracking

Trunk
mozilla19
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
User Agent: Opera/9.80 (Windows NT 5.1; U; Edition Next; ja) Presto/2.11.310 Version/12.50

Steps to reproduce:

python Preprocessor.py -Fslashslash doesn't work


Actual results:

$ cat test.js
// comment

$ python Preprocessor.py -Fslashslash test.js

Traceback (most recent call last):
  File "Preprocessor.py", line 475, in <module>
    main()
  File "Preprocessor.py", line 460, in main
    pp.handleCommandLine(None, True)
  File "Preprocessor.py", line 157, in handleCommandLine
    self.do_include(f, False)
  File "Preprocessor.py", line 445, in do_include
    self.handleLine(l)
  File "Preprocessor.py", line 226, in handleLine
    self.write(aLine)
  File "Preprocessor.py", line 136, in write
    filteredLine = self.applyFilters(aLine)
  File "Preprocessor.py", line 121, in applyFilters
    aLine = f[1](aLine)
  File "Preprocessor.py", line 385, in filter_slashslash
    [aLine, rest] = aLine.split('//', 1)
ValueError: need more than 1 value to unpack
(Reporter)

Comment 1

5 years ago
Created attachment 668381 [details]
test script
Status: UNCONFIRMED → NEW
Ever confirmed: true
this error caused by blank line with -Fslashslash option.
double slashed comment does not related.
(Assignee)

Comment 3

5 years ago
Created attachment 670235 [details] [diff] [review]
Fix for -Fslashslash option.
Attachment #670235 - Flags: review?
Attachment #670235 - Flags: review? → review?(ted.mielczarek)
You need to assign a reviewer. (Maybe Ted?)
Attachment #668381 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 670235 [details] [diff] [review]
Fix for -Fslashslash option.

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

Sorry for the review delay! This is fine, but it would be nice to have a unit test for it.
Attachment #670235 - Flags: review?(ted) → review+
Assignee: nobody → btm
https://hg.mozilla.org/integration/mozilla-inbound/rev/1b344f7a2e81
Target Milestone: --- → mozilla19
bustage fix (we have to sync config/* and js/src/config/*)
https://hg.mozilla.org/integration/mozilla-inbound/rev/30366a70c015
https://hg.mozilla.org/mozilla-central/rev/1b344f7a2e81
https://hg.mozilla.org/mozilla-central/rev/30366a70c015
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.