Parse problem with chrome const in 1.0b5

RESOLVED DUPLICATE of bug 596595

Status

Add-on SDK
General
RESOLVED DUPLICATE of bug 596595
7 years ago
7 years ago

People

(Reporter: thinkcontext, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-latest.zip

Using '... Cr' in a javascript variable gets parsed by python and causes an error on cfx run.  Using 1.0b5 and python2.6 on WindowsXP.

(C:\addon-sdk) C:\addon-sdk\examples\annotator>cfx run

To use chrome authority, as in:
 C:\addon-sdk\examples\annotator\lib\main.js
 9> var foo = 'some stuff Cr';
You must enable it with something like:
  const {Cr} = require("chrome");
Traceback (most recent call last):
  File "C:\addon-sdk\bin\cfx", line 29, in <module>
    cuddlefish.run()
  File "C:\addon-sdk\python-lib\cuddlefish\__init__.py", line 691, in run
    manifest = build_manifest(target_cfg, pkg_cfg, deps, uri_prefix, include_tes
ts)
  File "C:\addon-sdk\python-lib\cuddlefish\manifest.py", line 428, in build_mani
fest
    mxt.build(scan_tests)
  File "C:\addon-sdk\python-lib\cuddlefish\manifest.py", line 174, in build
    self.top_uri = self.process_module(self.find_top(self.target_cfg))
  File "C:\addon-sdk\python-lib\cuddlefish\manifest.py", line 245, in process_mo
dule
    raise BadChromeMarkerError()
cuddlefish.manifest.BadChromeMarkerError

Reproducible: Always

Steps to Reproduce:
1. Start with stock annotator example from 1.0b5
2. add "var foo = 'some stuff Cr';" at line 9
3. cfx run
as discussed in the meeting this morning, how about we remove the scanning code that's looking for "Cr"/"Cu", etc? I think we've made our point by now. The scanner should only look for "Components.", not the aliases folks usually create.
See also Bug 596595.
My patch for bug 596595 includes a unit test with a copy of this 'some stuff Cr' example.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 596595
You need to log in before you can comment on or make changes to this bug.