Closed Bug 826606 Opened 12 years ago Closed 12 years ago

DeviceProximityEvent is created with the wrong values.

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: wchen, Assigned: wchen)

References

()

Details

Attachments

(1 file)

Spec says: The value attribute of the DeviceProximityEvent interface must return the value it was initialized to. When the object is created, this attribute must be initialized to positive Infinity. It represents the current device proximity. The min attribute of the DeviceProximityEvent interface must return the value it was initialized to. When the object is created, this attribute must be initialized to negative Infinity. It represents the minimum sensing distance. The max attribute of the DeviceProximityEvent interface must return the value it was initialized to. When the object is created, this attribute must be initialized to positive Infinity. It represents the maximum sensing distance. Currently, value, min and max are all set to 0 when the object is created.
Attachment #697798 - Flags: review?(doug.turner)
Attachment #697798 - Flags: review?(bugs)
Comment on attachment 697798 [details] [diff] [review] Set uninitialized values for DeviceProximityEvent according to spec. Kyle needs to review xpidl.py
Attachment #697798 - Flags: review?(khuey)
Attachment #697798 - Flags: review?(bugs)
Attachment #697798 - Flags: review+
Comment on attachment 697798 [details] [diff] [review] Set uninitialized values for DeviceProximityEvent according to spec. Review of attachment 697798 [details] [diff] [review]: ----------------------------------------------------------------- lgtm -> khuey ::: js/xpconnect/src/dictionary_helper_gen.py @@ +280,5 @@ > attributes = [] > for member in iface.members: > if isinstance(member, xpidl.Attribute): > attributes.append(member) > since you're here, might as well kill this whitespace.
Attachment #697798 - Flags: review?(doug.turner) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Depends on: 829793
This patch led to a crash, if compiling thunderbird on windows: c:/c/o/mozilla/_virtualenv/Scripts/python.exe /c/c/mozilla/config/nsinstall.py -t -m 644 "_xpidlgen/nsIDOMMozBrowserFrame.h" "../../../dist/include" make[6]: Leaving directory `/c/c/o/mozilla/dom/interfaces/html' nsIDOMDeviceProximityEvent.idl make[6]: Entering directory `/c/c/o/mozilla/dom/interfaces/events' c:/c/o/mozilla/_virtualenv/Scripts/python.exe /c/c/mozilla/config/pythonpath.py \ -I/c/c/mozilla/other-licenses/ply \ c:/c/o/mozilla/dist/sdk/bin/header.py -I/c/c/mozilla/dom/interfaces/events -I../../../dist/idl -I/c/c/mozilla/dom/interfaces/base /c/c/mozilla/dom/interfaces /events/nsIDOMDeviceProximityEvent.idl -d .deps/nsIDOMDeviceProximityEvent.h.pp -o _xpidlgen/nsIDOMDeviceProximityEvent.h Traceback (most recent call last): File "c:/c/mozilla/config/pythonpath.py", line 56, in <module> main(sys.argv[1:]) File "c:/c/mozilla/config/pythonpath.py", line 48, in main execfile(script, frozenglobals) File "c:/c/o/mozilla/dist/sdk/bin/header.py", line 523, in <module> idl = p.parse(open(file).read(), filename=file) File "c:\c\o\mozilla\dist\sdk\bin\xpidl.py", line 1507, in parse idl = self.parser.parse(lexer=self) File "c:\c\o\mozilla\dist\sdk\bin\ply\yacc.py", line 265, in parse return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc) File "c:\c\o\mozilla\dist\sdk\bin\ply\yacc.py", line 1047, in parseopt_notrack tok = self.errorfunc(errtoken) File "c:\c\o\mozilla\dist\sdk\bin\xpidl.py", line 1478, in p_error raise IDLError("invalid syntax", location) xpidl.IDLError: error: invalid syntax, c:/c/mozilla/dom/interfaces/events/nsIDOMDeviceProximityEvent.idl line 24:18 double value = Infinity; ^ make[6]: *** [_xpidlgen/nsIDOMDeviceProximityEvent.h] Error 1 make[6]: *** Deleting file `_xpidlgen/nsIDOMDeviceProximityEvent.h' Any ideas why this is happening?
(In reply to Joachim Herb from comment #6) > Any ideas why this is happening? Yeah. It's a problem with stale files from old repositories: https://bugzilla.mozilla.org/show_bug.cgi?id=829793#c14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: