Opened 11 years ago

Last modified 5 years ago

#11519 new defect

dojox.uuid.generateTimeBasedUuid() issue on Mac OS

Reported by: JayZ(zhouxiang) Owned by: Adam Peller
Priority: high Milestone: 1.15
Component: Dojox Version: 1.4.3
Keywords: Cc: [email protected]…, skinner
Blocked By: Blocking:


dojox.uuid.generateTimeBasedUuid() does not work on Mac OS 10.5.8 / Safari 5(5533.16), but it works on Mac OS 10.6 / Safari 5(6533.16)

Change History (3)

comment:1 Changed 11 years ago by Adam Peller

Cc: skinner added

That's very odd. It's the assert that triggers it, and Brian had asserts in his code, not just in the tests, so we need to fix this, I guess. It appears to be a browser bug, for the expression really is zero, and is type number, yet ===0 evaluates to false! A Number wrapper seems to solve the problem, but I'd like to see if we can track this down a bit more or find a Safari ticket.

Index: generateTimeBasedUuid.js
--- generateTimeBasedUuid.js	(revision 22487)
+++ generateTimeBasedUuid.js	(working copy)
@@ -79,7 +79,7 @@
 		arrayA[2] &= 0xFFFF;
 		arrayA[0] += arrayA[1] >>> 16;
 		arrayA[1] &= 0xFFFF;
-		dojox.uuid.assert((arrayA[0] >>> 16) === 0);
+		dojox.uuid.assert(Number(arrayA[0] >>> 16) === 0); // Safari+OS 10.5 chokes here without Number wrapper
 	function _get64bitArrayFromFloat(/* float */ x){

comment:2 Changed 6 years ago by dylan

Milestone: tbd1.12

comment:3 Changed 5 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.