Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge branch 'issue/36' into develop
  • Loading branch information
pmuellr committed Apr 4, 2011
2 parents 02d3e66 + c34cf99 commit 7e21f8df3aa4784c300406f6350e8d6d756dd662
Show file tree
Hide file tree
Showing 7 changed files with 367 additions and 94 deletions.
@@ -10,4 +10,6 @@ java \
-Dfile.encoding=UTF-8 \
-classpath $CP \
weinre.server.Main \
--verbose true
--verbose true \
--deathTimeout 120

@@ -6,7 +6,11 @@
*/

h1 {
color: green;
color: green;
margin: 0.5em;
margin-right: 1.0em;
padding: 0.4em;
padding-right: 0.8em;
}

.blue {
@@ -12,9 +12,38 @@ class IDGenerator
//-----------------------------------------------------------------------------
init
var nextId = 1
var idName = "__weinre__id"

//-----------------------------------------------------------------------------
static method next
static method checkId(object)
return object[idName]

//-----------------------------------------------------------------------------
static method getId(object, map)
var id = IDGenerator.checkId(object)

if (!id) {
id = next()

// note:
// attempted to use Object.defineProperty() to make
// the id property non-enumerable, etc, but doesn't
// work in JSC (TypeError), and still shows up in
// Web Inspector property views anyway.
object[idName] = id
}

if (map) {
if (map[id] != object) {
map[id] = object
}
}

return id

//-----------------------------------------------------------------------------
function next
var result = nextId
nextId += 1
return result
return result

0 comments on commit 7e21f8d

Please sign in to comment.