You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pm...@apache.org on 2012/02/15 18:42:36 UTC

[6/51] [partial] Apache-ization, port to node.js

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/node_modules/coffee-script/lib/repl.js
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/node_modules/coffee-script/lib/repl.js b/weinre.build/vendor/node_modules/coffee-script/lib/repl.js
new file mode 100644
index 0000000..9e1bf7c
--- /dev/null
+++ b/weinre.build/vendor/node_modules/coffee-script/lib/repl.js
@@ -0,0 +1,123 @@
+(function() {
+  var ACCESSOR, CoffeeScript, Module, REPL_PROMPT, REPL_PROMPT_CONTINUATION, SIMPLEVAR, Script, autocomplete, backlog, completeAttribute, completeVariable, enableColours, error, g, getCompletions, inspect, nonContextGlobals, readline, repl, run, sandbox, stdin, stdout, _i, _len;
+  CoffeeScript = require('./coffee-script');
+  readline = require('readline');
+  inspect = require('util').inspect;
+  Script = require('vm').Script;
+  Module = require('module');
+  REPL_PROMPT = 'coffee> ';
+  REPL_PROMPT_CONTINUATION = '......> ';
+  enableColours = false;
+  if (process.platform !== 'win32') {
+    enableColours = !process.env.NODE_DISABLE_COLORS;
+  }
+  stdin = process.openStdin();
+  stdout = process.stdout;
+  error = function(err) {
+    return stdout.write((err.stack || err.toString()) + '\n\n');
+  };
+  backlog = '';
+  sandbox = Script.createContext();
+  nonContextGlobals = ['Buffer', 'console', 'process', 'setInterval', 'clearInterval', 'setTimeout', 'clearTimeout'];
+  for (_i = 0, _len = nonContextGlobals.length; _i < _len; _i++) {
+    g = nonContextGlobals[_i];
+    sandbox[g] = global[g];
+  }
+  sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox;
+  run = function(buffer) {
+    var code, returnValue, _;
+    if (!buffer.toString().trim() && !backlog) {
+      repl.prompt();
+      return;
+    }
+    code = backlog += buffer;
+    if (code[code.length - 1] === '\\') {
+      backlog = "" + backlog.slice(0, -1) + "\n";
+      repl.setPrompt(REPL_PROMPT_CONTINUATION);
+      repl.prompt();
+      return;
+    }
+    repl.setPrompt(REPL_PROMPT);
+    backlog = '';
+    try {
+      _ = sandbox._;
+      returnValue = CoffeeScript.eval("_=(" + code + "\n)", {
+        sandbox: sandbox,
+        filename: 'repl',
+        modulename: 'repl'
+      });
+      if (returnValue === void 0) {
+        sandbox._ = _;
+      } else {
+        process.stdout.write(inspect(returnValue, false, 2, enableColours) + '\n');
+      }
+    } catch (err) {
+      error(err);
+    }
+    return repl.prompt();
+  };
+  ACCESSOR = /\s*([\w\.]+)(?:\.(\w*))$/;
+  SIMPLEVAR = /\s*(\w*)$/i;
+  autocomplete = function(text) {
+    return completeAttribute(text) || completeVariable(text) || [[], text];
+  };
+  completeAttribute = function(text) {
+    var all, completions, match, obj, prefix, val;
+    if (match = text.match(ACCESSOR)) {
+      all = match[0], obj = match[1], prefix = match[2];
+      try {
+        val = Script.runInContext(obj, sandbox);
+      } catch (error) {
+        return;
+      }
+      completions = getCompletions(prefix, Object.getOwnPropertyNames(val));
+      return [completions, prefix];
+    }
+  };
+  completeVariable = function(text) {
+    var completions, free, possibilities, vars, _ref;
+    if (free = (_ref = text.match(SIMPLEVAR)) != null ? _ref[1] : void 0) {
+      vars = Script.runInContext('Object.getOwnPropertyNames(this)', sandbox);
+      possibilities = vars.concat(CoffeeScript.RESERVED);
+      completions = getCompletions(free, possibilities);
+      return [completions, free];
+    }
+  };
+  getCompletions = function(prefix, candidates) {
+    var el, _j, _len2, _results;
+    _results = [];
+    for (_j = 0, _len2 = candidates.length; _j < _len2; _j++) {
+      el = candidates[_j];
+      if (el.indexOf(prefix) === 0) {
+        _results.push(el);
+      }
+    }
+    return _results;
+  };
+  process.on('uncaughtException', error);
+  if (readline.createInterface.length < 3) {
+    repl = readline.createInterface(stdin, autocomplete);
+    stdin.on('data', function(buffer) {
+      return repl.write(buffer);
+    });
+  } else {
+    repl = readline.createInterface(stdin, stdout, autocomplete);
+  }
+  repl.on('attemptClose', function() {
+    if (backlog) {
+      backlog = '';
+      process.stdout.write('\n');
+      repl.setPrompt(REPL_PROMPT);
+      return repl.prompt();
+    } else {
+      return repl.close();
+    }
+  });
+  repl.on('close', function() {
+    process.stdout.write('\n');
+    return stdin.destroy();
+  });
+  repl.on('line', run);
+  repl.setPrompt(REPL_PROMPT);
+  repl.prompt();
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/node_modules/coffee-script/lib/rewriter.js
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/node_modules/coffee-script/lib/rewriter.js b/weinre.build/vendor/node_modules/coffee-script/lib/rewriter.js
new file mode 100644
index 0000000..d50a222
--- /dev/null
+++ b/weinre.build/vendor/node_modules/coffee-script/lib/rewriter.js
@@ -0,0 +1,363 @@
+(function() {
+  var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref;
+  var __indexOf = Array.prototype.indexOf || function(item) {
+    for (var i = 0, l = this.length; i < l; i++) {
+      if (this[i] === item) return i;
+    }
+    return -1;
+  }, __slice = Array.prototype.slice;
+  exports.Rewriter = (function() {
+    function Rewriter() {}
+    Rewriter.prototype.rewrite = function(tokens) {
+      this.tokens = tokens;
+      this.removeLeadingNewlines();
+      this.removeMidExpressionNewlines();
+      this.closeOpenCalls();
+      this.closeOpenIndexes();
+      this.addImplicitIndentation();
+      this.tagPostfixConditionals();
+      this.addImplicitBraces();
+      this.addImplicitParentheses();
+      this.ensureBalance(BALANCED_PAIRS);
+      this.rewriteClosingParens();
+      return this.tokens;
+    };
+    Rewriter.prototype.scanTokens = function(block) {
+      var i, token, tokens;
+      tokens = this.tokens;
+      i = 0;
+      while (token = tokens[i]) {
+        i += block.call(this, token, i, tokens);
+      }
+      return true;
+    };
+    Rewriter.prototype.detectEnd = function(i, condition, action) {
+      var levels, token, tokens, _ref, _ref2;
+      tokens = this.tokens;
+      levels = 0;
+      while (token = tokens[i]) {
+        if (levels === 0 && condition.call(this, token, i)) {
+          return action.call(this, token, i);
+        }
+        if (!token || levels < 0) {
+          return action.call(this, token, i - 1);
+        }
+        if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
+          levels += 1;
+        } else if (_ref2 = token[0], __indexOf.call(EXPRESSION_END, _ref2) >= 0) {
+          levels -= 1;
+        }
+        i += 1;
+      }
+      return i - 1;
+    };
+    Rewriter.prototype.removeLeadingNewlines = function() {
+      var i, tag, _len, _ref;
+      _ref = this.tokens;
+      for (i = 0, _len = _ref.length; i < _len; i++) {
+        tag = _ref[i][0];
+        if (tag !== 'TERMINATOR') {
+          break;
+        }
+      }
+      if (i) {
+        return this.tokens.splice(0, i);
+      }
+    };
+    Rewriter.prototype.removeMidExpressionNewlines = function() {
+      return this.scanTokens(function(token, i, tokens) {
+        var _ref;
+        if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) {
+          return 1;
+        }
+        tokens.splice(i, 1);
+        return 0;
+      });
+    };
+    Rewriter.prototype.closeOpenCalls = function() {
+      var action, condition;
+      condition = function(token, i) {
+        var _ref;
+        return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')';
+      };
+      action = function(token, i) {
+        return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
+      };
+      return this.scanTokens(function(token, i) {
+        if (token[0] === 'CALL_START') {
+          this.detectEnd(i + 1, condition, action);
+        }
+        return 1;
+      });
+    };
+    Rewriter.prototype.closeOpenIndexes = function() {
+      var action, condition;
+      condition = function(token, i) {
+        var _ref;
+        return (_ref = token[0]) === ']' || _ref === 'INDEX_END';
+      };
+      action = function(token, i) {
+        return token[0] = 'INDEX_END';
+      };
+      return this.scanTokens(function(token, i) {
+        if (token[0] === 'INDEX_START') {
+          this.detectEnd(i + 1, condition, action);
+        }
+        return 1;
+      });
+    };
+    Rewriter.prototype.addImplicitBraces = function() {
+      var action, condition, stack, start, startIndent;
+      stack = [];
+      start = null;
+      startIndent = 0;
+      condition = function(token, i) {
+        var one, tag, three, two, _ref, _ref2;
+        _ref = this.tokens.slice(i + 1, (i + 3 + 1) || 9e9), one = _ref[0], two = _ref[1], three = _ref[2];
+        if ('HERECOMMENT' === (one != null ? one[0] : void 0)) {
+          return false;
+        }
+        tag = token[0];
+        return ((tag === 'TERMINATOR' || tag === 'OUTDENT') && !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' && (three != null ? three[0] : void 0) === ':')) || (tag === ',' && one && ((_ref2 = one[0]) !== 'IDENTIFIER' && _ref2 !== 'NUMBER' && _ref2 !== 'STRING' && _ref2 !== '@' && _ref2 !== 'TERMINATOR' && _ref2 !== 'OUTDENT'));
+      };
+      action = function(token, i) {
+        var tok;
+        tok = ['}', '}', token[2]];
+        tok.generated = true;
+        return this.tokens.splice(i, 0, tok);
+      };
+      return this.scanTokens(function(token, i, tokens) {
+        var ago, idx, tag, tok, value, _ref, _ref2;
+        if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) {
+          stack.push([(tag === 'INDENT' && this.tag(i - 1) === '{' ? '{' : tag), i]);
+          return 1;
+        }
+        if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
+          start = stack.pop();
+          return 1;
+        }
+        if (!(tag === ':' && ((ago = this.tag(i - 2)) === ':' || ((_ref2 = stack[stack.length - 1]) != null ? _ref2[0] : void 0) !== '{'))) {
+          return 1;
+        }
+        stack.push(['{']);
+        idx = ago === '@' ? i - 2 : i - 1;
+        while (this.tag(idx - 2) === 'HERECOMMENT') {
+          idx -= 2;
+        }
+        value = new String('{');
+        value.generated = true;
+        tok = ['{', value, token[2]];
+        tok.generated = true;
+        tokens.splice(idx, 0, tok);
+        this.detectEnd(i + 2, condition, action);
+        return 2;
+      });
+    };
+    Rewriter.prototype.addImplicitParentheses = function() {
+      var action, noCall;
+      noCall = false;
+      action = function(token, i) {
+        var idx;
+        idx = token[0] === 'OUTDENT' ? i + 1 : i;
+        return this.tokens.splice(idx, 0, ['CALL_END', ')', token[2]]);
+      };
+      return this.scanTokens(function(token, i, tokens) {
+        var callObject, current, next, prev, seenControl, seenSingle, tag, _ref, _ref2, _ref3;
+        tag = token[0];
+        if (tag === 'CLASS' || tag === 'IF') {
+          noCall = true;
+        }
+        _ref = tokens.slice(i - 1, (i + 1 + 1) || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2];
+        callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0);
+        seenSingle = false;
+        seenControl = false;
+        if (__indexOf.call(LINEBREAKS, tag) >= 0) {
+          noCall = false;
+        }
+        if (prev && !prev.spaced && tag === '?') {
+          token.call = true;
+        }
+        if (token.fromThen) {
+          return 1;
+        }
+        if (!(callObject || (prev != null ? prev.spaced : void 0) && (prev.call || (_ref3 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref3) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || !(token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) {
+          return 1;
+        }
+        tokens.splice(i, 0, ['CALL_START', '(', token[2]]);
+        this.detectEnd(i + 1, function(token, i) {
+          var post, _ref4;
+          tag = token[0];
+          if (!seenSingle && token.fromThen) {
+            return true;
+          }
+          if (tag === 'IF' || tag === 'ELSE' || tag === 'CATCH' || tag === '->' || tag === '=>') {
+            seenSingle = true;
+          }
+          if (tag === 'IF' || tag === 'ELSE' || tag === 'SWITCH' || tag === 'TRY') {
+            seenControl = true;
+          }
+          if ((tag === '.' || tag === '?.' || tag === '::') && this.tag(i - 1) === 'OUTDENT') {
+            return true;
+          }
+          return !token.generated && this.tag(i - 1) !== ',' && (__indexOf.call(IMPLICIT_END, tag) >= 0 || (tag === 'INDENT' && !seenControl)) && (tag !== 'INDENT' || (this.tag(i - 2) !== 'CLASS' && (_ref4 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref4) < 0) && !((post = this.tokens[i + 1]) && post.generated && post[0] === '{')));
+        }, action);
+        if (prev[0] === '?') {
+          prev[0] = 'FUNC_EXIST';
+        }
+        return 2;
+      });
+    };
+    Rewriter.prototype.addImplicitIndentation = function() {
+      return this.scanTokens(function(token, i, tokens) {
+        var action, condition, indent, outdent, starter, tag, _ref, _ref2;
+        tag = token[0];
+        if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') {
+          tokens.splice(i, 1);
+          return 0;
+        }
+        if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') {
+          tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation(token))));
+          return 2;
+        }
+        if (tag === 'CATCH' && ((_ref = this.tag(i + 2)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) {
+          tokens.splice.apply(tokens, [i + 2, 0].concat(__slice.call(this.indentation(token))));
+          return 4;
+        }
+        if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
+          starter = tag;
+          _ref2 = this.indentation(token), indent = _ref2[0], outdent = _ref2[1];
+          if (starter === 'THEN') {
+            indent.fromThen = true;
+          }
+          indent.generated = outdent.generated = true;
+          tokens.splice(i + 1, 0, indent);
+          condition = function(token, i) {
+            var _ref3;
+            return token[1] !== ';' && (_ref3 = token[0], __indexOf.call(SINGLE_CLOSERS, _ref3) >= 0) && !(token[0] === 'ELSE' && (starter !== 'IF' && starter !== 'THEN'));
+          };
+          action = function(token, i) {
+            return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
+          };
+          this.detectEnd(i + 2, condition, action);
+          if (tag === 'THEN') {
+            tokens.splice(i, 1);
+          }
+          return 1;
+        }
+        return 1;
+      });
+    };
+    Rewriter.prototype.tagPostfixConditionals = function() {
+      var condition;
+      condition = function(token, i) {
+        var _ref;
+        return (_ref = token[0]) === 'TERMINATOR' || _ref === 'INDENT';
+      };
+      return this.scanTokens(function(token, i) {
+        var original;
+        if (token[0] !== 'IF') {
+          return 1;
+        }
+        original = token;
+        this.detectEnd(i + 1, condition, function(token, i) {
+          if (token[0] !== 'INDENT') {
+            return original[0] = 'POST_' + original[0];
+          }
+        });
+        return 1;
+      });
+    };
+    Rewriter.prototype.ensureBalance = function(pairs) {
+      var close, level, levels, open, openLine, tag, token, _i, _j, _len, _len2, _ref, _ref2;
+      levels = {};
+      openLine = {};
+      _ref = this.tokens;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        token = _ref[_i];
+        tag = token[0];
+        for (_j = 0, _len2 = pairs.length; _j < _len2; _j++) {
+          _ref2 = pairs[_j], open = _ref2[0], close = _ref2[1];
+          levels[open] |= 0;
+          if (tag === open) {
+            if (levels[open]++ === 0) {
+              openLine[open] = token[2];
+            }
+          } else if (tag === close && --levels[open] < 0) {
+            throw Error("too many " + token[1] + " on line " + (token[2] + 1));
+          }
+        }
+      }
+      for (open in levels) {
+        level = levels[open];
+        if (level > 0) {
+          throw Error("unclosed " + open + " on line " + (openLine[open] + 1));
+        }
+      }
+      return this;
+    };
+    Rewriter.prototype.rewriteClosingParens = function() {
+      var debt, key, stack;
+      stack = [];
+      debt = {};
+      for (key in INVERSES) {
+        debt[key] = 0;
+      }
+      return this.scanTokens(function(token, i, tokens) {
+        var inv, match, mtag, oppos, tag, val, _ref;
+        if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) {
+          stack.push(token);
+          return 1;
+        }
+        if (__indexOf.call(EXPRESSION_END, tag) < 0) {
+          return 1;
+        }
+        if (debt[inv = INVERSES[tag]] > 0) {
+          debt[inv] -= 1;
+          tokens.splice(i, 1);
+          return 0;
+        }
+        match = stack.pop();
+        mtag = match[0];
+        oppos = INVERSES[mtag];
+        if (tag === oppos) {
+          return 1;
+        }
+        debt[mtag] += 1;
+        val = [oppos, mtag === 'INDENT' ? match[1] : oppos];
+        if (this.tag(i + 2) === mtag) {
+          tokens.splice(i + 3, 0, val);
+          stack.push(match);
+        } else {
+          tokens.splice(i, 0, val);
+        }
+        return 1;
+      });
+    };
+    Rewriter.prototype.indentation = function(token) {
+      return [['INDENT', 2, token[2]], ['OUTDENT', 2, token[2]]];
+    };
+    Rewriter.prototype.tag = function(i) {
+      var _ref;
+      return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
+    };
+    return Rewriter;
+  })();
+  BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
+  INVERSES = {};
+  EXPRESSION_START = [];
+  EXPRESSION_END = [];
+  for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
+    _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
+    EXPRESSION_START.push(INVERSES[rite] = left);
+    EXPRESSION_END.push(INVERSES[left] = rite);
+  }
+  EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
+  IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
+  IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++'];
+  IMPLICIT_UNSPACED_CALL = ['+', '-'];
+  IMPLICIT_BLOCK = ['->', '=>', '{', '[', ','];
+  IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
+  SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
+  SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
+  LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/node_modules/coffee-script/lib/scope.js
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/node_modules/coffee-script/lib/scope.js b/weinre.build/vendor/node_modules/coffee-script/lib/scope.js
new file mode 100644
index 0000000..ab88ba9
--- /dev/null
+++ b/weinre.build/vendor/node_modules/coffee-script/lib/scope.js
@@ -0,0 +1,120 @@
+(function() {
+  var Scope, extend, last, _ref;
+  _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
+  exports.Scope = Scope = (function() {
+    Scope.root = null;
+    function Scope(parent, expressions, method) {
+      this.parent = parent;
+      this.expressions = expressions;
+      this.method = method;
+      this.variables = [
+        {
+          name: 'arguments',
+          type: 'arguments'
+        }
+      ];
+      this.positions = {};
+      if (!this.parent) {
+        Scope.root = this;
+      }
+    }
+    Scope.prototype.add = function(name, type, immediate) {
+      var pos;
+      if (this.shared && !immediate) {
+        return this.parent.add(name, type, immediate);
+      }
+      if (typeof (pos = this.positions[name]) === 'number') {
+        return this.variables[pos].type = type;
+      } else {
+        return this.positions[name] = this.variables.push({
+          name: name,
+          type: type
+        }) - 1;
+      }
+    };
+    Scope.prototype.find = function(name, options) {
+      if (this.check(name, options)) {
+        return true;
+      }
+      this.add(name, 'var');
+      return false;
+    };
+    Scope.prototype.parameter = function(name) {
+      if (this.shared && this.parent.check(name, true)) {
+        return;
+      }
+      return this.add(name, 'param');
+    };
+    Scope.prototype.check = function(name, immediate) {
+      var found, _ref2;
+      found = !!this.type(name);
+      if (found || immediate) {
+        return found;
+      }
+      return !!((_ref2 = this.parent) != null ? _ref2.check(name) : void 0);
+    };
+    Scope.prototype.temporary = function(name, index) {
+      if (name.length > 1) {
+        return '_' + name + (index > 1 ? index : '');
+      } else {
+        return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
+      }
+    };
+    Scope.prototype.type = function(name) {
+      var v, _i, _len, _ref2;
+      _ref2 = this.variables;
+      for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+        v = _ref2[_i];
+        if (v.name === name) {
+          return v.type;
+        }
+      }
+      return null;
+    };
+    Scope.prototype.freeVariable = function(type) {
+      var index, temp;
+      index = 0;
+      while (this.check((temp = this.temporary(type, index)))) {
+        index++;
+      }
+      this.add(temp, 'var', true);
+      return temp;
+    };
+    Scope.prototype.assign = function(name, value) {
+      this.add(name, {
+        value: value,
+        assigned: true
+      });
+      return this.hasAssignments = true;
+    };
+    Scope.prototype.hasDeclarations = function() {
+      return !!this.declaredVariables().length;
+    };
+    Scope.prototype.declaredVariables = function() {
+      var realVars, tempVars, v, _i, _len, _ref2;
+      realVars = [];
+      tempVars = [];
+      _ref2 = this.variables;
+      for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+        v = _ref2[_i];
+        if (v.type === 'var') {
+          (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
+        }
+      }
+      return realVars.sort().concat(tempVars.sort());
+    };
+    Scope.prototype.assignedVariables = function() {
+      var v, _i, _len, _ref2, _results;
+      _ref2 = this.variables;
+      _results = [];
+      for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+        v = _ref2[_i];
+        if (v.type.assigned) {
+          _results.push("" + v.name + " = " + v.type.value);
+        }
+      }
+      return _results;
+    };
+    return Scope;
+  })();
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/node_modules/coffee-script/package.json
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/node_modules/coffee-script/package.json b/weinre.build/vendor/node_modules/coffee-script/package.json
new file mode 100644
index 0000000..58210ed
--- /dev/null
+++ b/weinre.build/vendor/node_modules/coffee-script/package.json
@@ -0,0 +1,27 @@
+{
+  "name":         "coffee-script",
+  "description":  "Unfancy JavaScript",
+  "keywords":     ["javascript", "language", "coffeescript", "compiler"],
+  "author":       "Jeremy Ashkenas",
+  "version":      "1.1.2",
+  "licenses":     [{
+    "type":       "MIT",
+    "url":        "http://github.com/jashkenas/coffee-script/raw/master/LICENSE"
+  }],
+  "engines":      {
+    "node":       ">=0.2.5"
+  },
+  "directories" : {
+    "lib" : "./lib"
+  },
+  "main" : "./lib/coffee-script",
+  "bin":          {
+    "coffee":     "./bin/coffee",
+    "cake":       "./bin/cake"
+  },
+  "homepage":     "http://coffeescript.org",
+  "repository":   {
+    "type": "git",
+    "url": "git://github.com/jashkenas/coffee-script.git"
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/English.lproj/localizedStrings.js
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/English.lproj/localizedStrings.js b/weinre.build/vendor/webkit/WebCore/English.lproj/localizedStrings.js
new file mode 100644
index 0000000..6f759a2
Binary files /dev/null and b/weinre.build/vendor/webkit/WebCore/English.lproj/localizedStrings.js differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptHost.idl
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptHost.idl b/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptHost.idl
new file mode 100644
index 0000000..5fb57b4
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptHost.idl
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek <we...@mattlilek.com>
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module core {
+    interface [Conditional=INSPECTOR] InjectedScriptHost {
+        void clearConsoleMessages();
+
+        void copyText(in DOMString text);
+        [Custom] DOMObject nodeForId(in long nodeId);
+        [Custom] int pushNodePathToFrontend(in DOMObject node, in boolean withChildren, in boolean selectInUI);
+        long inspectedNode(in unsigned long num);
+        [Custom] DOMObject internalConstructorName(in DOMObject object);
+
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+        [Custom] DOMObject currentCallFrame();
+#endif
+
+#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
+        [Custom] void selectDatabase(in DOMObject database);
+#endif
+
+#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
+        [Custom] void selectDOMStorage(in DOMObject storage);
+#endif
+
+#if defined(ENABLE_WORKERS) && ENABLE_WORKERS
+        void didCreateWorker(in long id, in DOMString url, in boolean isFakeWorker);
+        void didDestroyWorker(in long id);
+        long nextWorkerId();
+#endif
+    };
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptSource.js
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptSource.js b/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptSource.js
new file mode 100644
index 0000000..c88e8e4
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/InjectedScriptSource.js
@@ -0,0 +1,763 @@
+/*
+ * Copyright (C) 2007 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function (InjectedScriptHost, inspectedWindow, injectedScriptId) {
+
+function bind(thisObject, memberFunction)
+{
+    var func = memberFunction;
+    var args = Array.prototype.slice.call(arguments, 2);
+    function bound()
+    {
+        return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0)));
+    }
+    bound.toString = function() {
+        return "bound: " + func;
+    };
+    return bound;
+}
+
+var InjectedScript = function()
+{
+    this._lastBoundObjectId = 1;
+    this._idToWrappedObject = {};
+    this._objectGroups = {};
+}
+
+InjectedScript.prototype = {
+    wrapObjectForConsole: function(object, canAccessInspectedWindow)
+    {
+        if (canAccessInspectedWindow)
+            return this._wrapObject(object, "console");
+        var result = {};
+        result.type = typeof object;
+        result.description = this._toString(object);
+        return result;
+    },
+
+    _wrapObject: function(object, objectGroupName, abbreviate)
+    {
+        try {
+            var objectId;
+            if (typeof object === "object" || typeof object === "function" || this._isHTMLAllCollection(object)) {
+                var id = this._lastBoundObjectId++;
+                this._idToWrappedObject[id] = object;
+    
+                var group = this._objectGroups[objectGroupName];
+                if (!group) {
+                    group = [];
+                    this._objectGroups[objectGroupName] = group;
+                }
+                group.push(id);
+                objectId = { injectedScriptId: injectedScriptId,
+                             id: id,
+                             groupName: objectGroupName };
+            }
+            return InjectedScript.RemoteObject.fromObject(object, objectId, abbreviate);
+        } catch (e) {
+            return InjectedScript.RemoteObject.fromObject("[ Exception: " + e.toString() + " ]");
+        }
+    },
+
+    _parseObjectId: function(objectId)
+    {
+        return eval("(" + objectId + ")");
+    },
+
+    releaseWrapperObjectGroup: function(objectGroupName)
+    {
+        var group = this._objectGroups[objectGroupName];
+        if (!group)
+            return;
+        for (var i = 0; i < group.length; i++)
+            delete this._idToWrappedObject[group[i]];
+        delete this._objectGroups[objectGroupName];
+    },
+
+    dispatch: function(methodName, args)
+    {
+        var argsArray = eval("(" + args + ")");
+        var result = this[methodName].apply(this, argsArray);
+        if (typeof result === "undefined") {
+            inspectedWindow.console.error("Web Inspector error: InjectedScript.%s returns undefined", methodName);
+            result = null;
+        }
+        return result;
+    },
+
+    getProperties: function(objectId, ignoreHasOwnProperty, abbreviate)
+    {
+        var parsedObjectId = this._parseObjectId(objectId);
+        var object = this._objectForId(parsedObjectId);
+
+        if (!this._isDefined(object))
+            return false;
+        var properties = [];
+
+        var propertyNames = ignoreHasOwnProperty ? this._getPropertyNames(object) : Object.getOwnPropertyNames(object);
+        if (!ignoreHasOwnProperty && object.__proto__)
+            propertyNames.push("__proto__");
+    
+        // Go over properties, prepare results.
+        for (var i = 0; i < propertyNames.length; ++i) {
+            var propertyName = propertyNames[i];
+    
+            var property = {};
+            property.name = propertyName + "";
+            var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);
+            if (!isGetter) {
+                try {
+                    property.value = this._wrapObject(object[propertyName], parsedObjectId.groupName, abbreviate);
+                } catch(e) {
+                    property.value = new InjectedScript.RemoteObject.fromException(e);
+                }
+            } else {
+                // FIXME: this should show something like "getter" (bug 16734).
+                property.value = new InjectedScript.RemoteObject.fromObject("\u2014"); // em dash
+                property.isGetter = true;
+            }
+            properties.push(property);
+        }
+        return properties;
+    },
+
+    setPropertyValue: function(objectId, propertyName, expression)
+    {
+        var parsedObjectId = this._parseObjectId(objectId);
+        var object = this._objectForId(parsedObjectId);
+        if (!this._isDefined(object))
+            return false;
+    
+        var expressionLength = expression.length;
+        if (!expressionLength) {
+            delete object[propertyName];
+            return !(propertyName in object);
+        }
+    
+        try {
+            // Surround the expression in parenthesis so the result of the eval is the result
+            // of the whole expression not the last potential sub-expression.
+    
+            // There is a regression introduced here: eval is now happening against global object,
+            // not call frame while on a breakpoint.
+            // TODO: bring evaluation against call frame back.
+            var result = inspectedWindow.eval("(" + expression + ")");
+            // Store the result in the property.
+            object[propertyName] = result;
+            return true;
+        } catch(e) {
+            try {
+                var result = inspectedWindow.eval("\"" + expression.replace(/"/g, "\\\"") + "\"");
+                object[propertyName] = result;
+                return true;
+            } catch(e) {
+                return false;
+            }
+        }
+    },
+
+    _populatePropertyNames: function(object, resultSet)
+    {
+        for (var o = object; o; o = o.__proto__) {
+            try {
+                var names = Object.getOwnPropertyNames(o);
+                for (var i = 0; i < names.length; ++i)
+                    resultSet[names[i]] = true;
+            } catch (e) {
+            }
+        }
+    },
+
+    _getPropertyNames: function(object, resultSet)
+    {
+        var propertyNameSet = {};
+        this._populatePropertyNames(object, propertyNameSet);
+        return Object.keys(propertyNameSet);
+    },
+
+    getCompletions: function(expression, includeCommandLineAPI)
+    {
+        var props = {};
+        try {
+            if (!expression)
+                expression = "this";
+            var expressionResult = this._evaluateOn(inspectedWindow.eval, inspectedWindow, expression, false, false);
+
+            if (typeof expressionResult === "object")
+                this._populatePropertyNames(expressionResult, props);
+
+            if (includeCommandLineAPI) {
+                for (var prop in CommandLineAPI.members_)
+                    props[CommandLineAPI.members_[prop]] = true;
+            }
+        } catch(e) {
+        }
+        return props;
+    },
+
+    getCompletionsOnCallFrame: function(callFrameId, expression, includeCommandLineAPI)
+    {
+        var props = {};
+        try {
+            var callFrame = this._callFrameForId(callFrameId);
+            if (!callFrame)
+                return props;
+
+            if (expression) {
+                var expressionResult = this._evaluateOn(callFrame.evaluate, callFrame, expression, true, false);
+                if (typeof expressionResult === "object")
+                    this._populatePropertyNames(expressionResult, props);
+            } else {
+                // Evaluate into properties in scope of the selected call frame.
+                var scopeChain = callFrame.scopeChain;
+                for (var i = 0; i < scopeChain.length; ++i)
+                    this._populatePropertyNames(scopeChain[i], props);
+            }
+    
+            if (includeCommandLineAPI) {
+                for (var prop in CommandLineAPI.members_)
+                    props[CommandLineAPI.members_[prop]] = true;
+            }
+        } catch(e) {
+        }
+        return props;
+    },
+
+    evaluate: function(expression, objectGroup, injectCommandLineAPI)
+    {
+        return this._evaluateAndWrap(inspectedWindow.eval, inspectedWindow, expression, objectGroup, false, injectCommandLineAPI);
+    },
+
+    _evaluateAndWrap: function(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, injectCommandLineAPI)
+    {
+        try {
+            return this._wrapObject(this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup);
+        } catch (e) {
+            return InjectedScript.RemoteObject.fromException(e);
+        }
+    },
+
+    _evaluateOn: function(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI)
+    {
+        // Only install command line api object for the time of evaluation.
+        // Surround the expression in with statements to inject our command line API so that
+        // the window object properties still take more precedent than our API functions.
+
+        try {
+            if (injectCommandLineAPI && inspectedWindow.console) {
+                inspectedWindow.console._commandLineAPI = new CommandLineAPI(this._commandLineAPIImpl, isEvalOnCallFrame ? object : null);
+                expression = "with ((window && window.console && window.console._commandLineAPI) || {}) {\n" + expression + "\n}";
+            }
+
+            var value = evalFunction.call(object, expression);
+
+            // When evaluating on call frame error is not thrown, but returned as a value.
+            if (this._type(value) === "error")
+                throw value.toString();
+
+            return value;
+        } finally {
+            if (injectCommandLineAPI && inspectedWindow.console)
+                delete inspectedWindow.console._commandLineAPI;
+        }
+    },
+
+    getNodeId: function(node)
+    {
+        return InjectedScriptHost.pushNodePathToFrontend(node, false, false);
+    },
+
+    callFrames: function()
+    {
+        var callFrame = InjectedScriptHost.currentCallFrame();
+        if (!callFrame)
+            return false;
+    
+        injectedScript.releaseWrapperObjectGroup("backtrace");
+        var result = [];
+        var depth = 0;
+        do {
+            result.push(new InjectedScript.CallFrameProxy(depth++, callFrame));
+            callFrame = callFrame.caller;
+        } while (callFrame);
+        return result;
+    },
+
+    evaluateOnCallFrame: function(callFrameId, expression, objectGroup, injectCommandLineAPI)
+    {
+        var callFrame = this._callFrameForId(callFrameId);
+        if (!callFrame)
+            return false;
+        return this._evaluateAndWrap(callFrame.evaluate, callFrame, expression, objectGroup, true, injectCommandLineAPI);
+    },
+
+    _callFrameForId: function(callFrameId)
+    {
+        var parsedCallFrameId = eval("(" + callFrameId + ")");
+        var ordinal = parsedCallFrameId.ordinal;
+        var callFrame = InjectedScriptHost.currentCallFrame();
+        while (--ordinal >= 0 && callFrame)
+            callFrame = callFrame.caller;
+        return callFrame;
+    },
+
+    _nodeForId: function(nodeId)
+    {
+        if (!nodeId)
+            return null;
+        return InjectedScriptHost.nodeForId(nodeId);
+    },
+
+    _objectForId: function(objectId)
+    {
+        return this._idToWrappedObject[objectId.id];
+    },
+
+    resolveNode: function(nodeId)
+    {
+        var node = this._nodeForId(nodeId);
+        if (!node)
+            return false;
+        // FIXME: receive the object group from client.
+        return this._wrapObject(node, "prototype");
+    },
+
+    getNodeProperties: function(nodeId, properties)
+    {
+        var node = this._nodeForId(nodeId);
+        if (!node)
+            return false;
+        properties = eval("(" + properties + ")");
+        var result = {};
+        for (var i = 0; i < properties.length; ++i)
+            result[properties[i]] = node[properties[i]];
+        return result;
+    },
+
+    getNodePrototypes: function(nodeId)
+    {
+        this.releaseWrapperObjectGroup("prototypes");
+        var node = this._nodeForId(nodeId);
+        if (!node)
+            return false;
+
+        var result = [];
+        var prototype = node;
+        do {
+            result.push(this._wrapObject(prototype, "prototypes"));
+            prototype = prototype.__proto__;
+        } while (prototype)
+        return result;
+    },
+
+    pushNodeToFrontend: function(objectId)
+    {
+        var parsedObjectId = this._parseObjectId(objectId);
+        var object = this._objectForId(parsedObjectId);
+        if (!object || this._type(object) !== "node")
+            return false;
+        return InjectedScriptHost.pushNodePathToFrontend(object, false, false);
+    },
+
+    evaluateOnSelf: function(funcBody, args)
+    {
+        var func = eval("(" + funcBody + ")");
+        return func.apply(this, eval("(" + args + ")") || []);
+    },
+
+    _isDefined: function(object)
+    {
+        return object || this._isHTMLAllCollection(object);
+    },
+
+    _isHTMLAllCollection: function(object)
+    {
+        // document.all is reported as undefined, but we still want to process it.
+        return (typeof object === "undefined") && inspectedWindow.HTMLAllCollection && object instanceof inspectedWindow.HTMLAllCollection;
+    },
+
+    _type: function(obj)
+    {
+        if (obj === null)
+            return "null";
+
+        var type = typeof obj;
+        if (type !== "object" && type !== "function") {
+            // FIXME(33716): typeof document.all is always 'undefined'.
+            if (this._isHTMLAllCollection(obj))
+                return "array";
+            return type;
+        }
+
+        // If owning frame has navigated to somewhere else window properties will be undefined.
+        // In this case just return result of the typeof.
+        if (!inspectedWindow.document)
+            return type;
+
+        if (obj instanceof inspectedWindow.Node)
+            return (obj.nodeType === undefined ? type : "node");
+        if (obj instanceof inspectedWindow.String)
+            return "string";
+        if (obj instanceof inspectedWindow.Array)
+            return "array";
+        if (obj instanceof inspectedWindow.Boolean)
+            return "boolean";
+        if (obj instanceof inspectedWindow.Number)
+            return "number";
+        if (obj instanceof inspectedWindow.Date)
+            return "date";
+        if (obj instanceof inspectedWindow.RegExp)
+            return "regexp";
+        // FireBug's array detection.
+        if (isFinite(obj.length) && typeof obj.splice === "function")
+            return "array";
+        if (isFinite(obj.length) && typeof obj.callee === "function") // arguments.
+            return "array";
+        if (obj instanceof inspectedWindow.NodeList)
+            return "array";
+        if (obj instanceof inspectedWindow.HTMLCollection)
+            return "array";
+        if (obj instanceof inspectedWindow.Error)
+            return "error";
+        return type;
+    },
+
+    _describe: function(obj, abbreviated)
+    {
+        var type = this._type(obj);
+
+        switch (type) {
+        case "object":
+        case "node":
+            var result = InjectedScriptHost.internalConstructorName(obj);
+            if (result === "Object") {
+                // In Chromium DOM wrapper prototypes will have Object as their constructor name,
+                // get the real DOM wrapper name from the constructor property.
+                var constructorName = obj.constructor && obj.constructor.name;
+                if (constructorName)
+                    return constructorName;
+            }
+            return result;
+        case "array":
+            var className = InjectedScriptHost.internalConstructorName(obj);
+            if (typeof obj.length === "number")
+                className += "[" + obj.length + "]";
+            return className;
+        case "string":
+            if (!abbreviated)
+                return obj;
+            if (obj.length > 100)
+                return "\"" + obj.substring(0, 100) + "\u2026\"";
+            return "\"" + obj + "\"";
+        case "function":
+            var objectText = this._toString(obj);
+            if (abbreviated)
+                objectText = /.*/.exec(objectText)[0].replace(/ +$/g, "");
+            return objectText;
+        default:
+            return this._toString(obj);
+        }
+    },
+
+    _toString: function(obj)
+    {
+        // We don't use String(obj) because inspectedWindow.String is undefined if owning frame navigated to another page.
+        return "" + obj;
+    }
+}
+
+var injectedScript = new InjectedScript();
+
+InjectedScript.RemoteObject = function(objectId, type, description, hasChildren)
+{
+    this.objectId = objectId;
+    this.type = type;
+    this.description = description;
+    this.hasChildren = hasChildren;
+}
+
+InjectedScript.RemoteObject.fromException = function(e)
+{
+    return new InjectedScript.RemoteObject(null, "error", e.toString());
+}
+
+InjectedScript.RemoteObject.fromObject = function(object, objectId, abbreviate)
+{
+    var type = injectedScript._type(object);
+    var rawType = typeof object;
+    var hasChildren = (rawType === "object" && object !== null && (Object.getOwnPropertyNames(object).length || !!object.__proto__)) || rawType === "function";
+    var description = "";
+    try {
+        var description = injectedScript._describe(object, abbreviate);
+        return new InjectedScript.RemoteObject(objectId, type, description, hasChildren);
+    } catch (e) {
+        return InjectedScript.RemoteObject.fromException(e);
+    }
+}
+
+InjectedScript.CallFrameProxy = function(ordinal, callFrame)
+{
+    this.id = { ordinal: ordinal, injectedScriptId: injectedScriptId };
+    this.type = callFrame.type;
+    this.functionName = (this.type === "function" ? callFrame.functionName : "");
+    this.sourceID = callFrame.sourceID;
+    this.line = callFrame.line;
+    this.column = callFrame.column;
+    this.scopeChain = this._wrapScopeChain(callFrame);
+}
+
+InjectedScript.CallFrameProxy.prototype = {
+    _wrapScopeChain: function(callFrame)
+    {
+        const GLOBAL_SCOPE = 0;
+        const LOCAL_SCOPE = 1;
+        const WITH_SCOPE = 2;
+        const CLOSURE_SCOPE = 3;
+        const CATCH_SCOPE = 4;
+    
+        var scopeChain = callFrame.scopeChain;
+        var scopeChainProxy = [];
+        var foundLocalScope = false;
+        for (var i = 0; i < scopeChain.length; i++) {
+            var scopeType = callFrame.scopeType(i);
+            var scopeObject = scopeChain[i];
+            var scopeObjectProxy = injectedScript._wrapObject(scopeObject, "backtrace", true);
+
+            switch(scopeType) {
+                case LOCAL_SCOPE: {
+                    foundLocalScope = true;
+                    scopeObjectProxy.isLocal = true;
+                    scopeObjectProxy.thisObject = injectedScript._wrapObject(callFrame.thisObject, "backtrace", true);
+                    break;
+                }
+                case CLOSURE_SCOPE: {
+                    scopeObjectProxy.isClosure = true;
+                    break;
+                }
+                case WITH_SCOPE:
+                case CATCH_SCOPE: {
+                    if (foundLocalScope && scopeObject instanceof inspectedWindow.Element)
+                        scopeObjectProxy.isElement = true;
+                    else if (foundLocalScope && scopeObject instanceof inspectedWindow.Document)
+                        scopeObjectProxy.isDocument = true;
+                    else
+                        scopeObjectProxy.isWithBlock = true;
+                    break;
+                }
+            }
+            scopeChainProxy.push(scopeObjectProxy);
+        }
+        return scopeChainProxy;
+    }
+}
+
+function CommandLineAPI(commandLineAPIImpl, callFrame)
+{
+    function inScopeVariables(member)
+    {
+        if (!callFrame)
+            return false;
+
+        var scopeChain = callFrame.scopeChain;
+        for (var i = 0; i < scopeChain.length; ++i) {
+            if (member in scopeChain[i])
+                return true;
+        }
+        return false;
+    }
+
+    for (var i = 0; i < CommandLineAPI.members_.length; ++i) {
+        var member = CommandLineAPI.members_[i];
+        if (member in inspectedWindow || inScopeVariables(member))
+            continue;
+
+        this[member] = bind(commandLineAPIImpl, commandLineAPIImpl[member]);
+    }
+
+    for (var i = 0; i < 5; ++i) {
+        var member = "$" + i;
+        if (member in inspectedWindow || inScopeVariables(member))
+            continue;
+
+        this.__defineGetter__("$" + i, bind(commandLineAPIImpl, commandLineAPIImpl._inspectedNode, i));
+    }
+}
+
+CommandLineAPI.members_ = [
+    "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd",
+    "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear"
+];
+
+function CommandLineAPIImpl()
+{
+}
+
+CommandLineAPIImpl.prototype = {
+    $: function()
+    {
+        return document.getElementById.apply(document, arguments)
+    },
+
+    $$: function()
+    {
+        return document.querySelectorAll.apply(document, arguments)
+    },
+
+    $x: function(xpath, context)
+    {
+        var nodes = [];
+        try {
+            var doc = (context && context.ownerDocument) || inspectedWindow.document;
+            var results = doc.evaluate(xpath, context || doc, null, XPathResult.ANY_TYPE, null);
+            var node;
+            while (node = results.iterateNext())
+                nodes.push(node);
+        } catch (e) {
+        }
+        return nodes;
+    },
+
+    dir: function()
+    {
+        return console.dir.apply(console, arguments)
+    },
+
+    dirxml: function()
+    {
+        return console.dirxml.apply(console, arguments)
+    },
+
+    keys: function(object)
+    {
+        return Object.keys(object);
+    },
+
+    values: function(object)
+    {
+        var result = [];
+        for (var key in object)
+            result.push(object[key]);
+        return result;
+    },
+
+    profile: function()
+    {
+        return console.profile.apply(console, arguments)
+    },
+
+    profileEnd: function()
+    {
+        return console.profileEnd.apply(console, arguments)
+    },
+
+    monitorEvents: function(object, types)
+    {
+        if (!object || !object.addEventListener || !object.removeEventListener)
+            return;
+        types = this._normalizeEventTypes(types);
+        for (var i = 0; i < types.length; ++i) {
+            object.removeEventListener(types[i], this._logEvent, false);
+            object.addEventListener(types[i], this._logEvent, false);
+        }
+    },
+
+    unmonitorEvents: function(object, types)
+    {
+        if (!object || !object.addEventListener || !object.removeEventListener)
+            return;
+        types = this._normalizeEventTypes(types);
+        for (var i = 0; i < types.length; ++i)
+            object.removeEventListener(types[i], this._logEvent, false);
+    },
+
+    inspect: function(object)
+    {
+        if (arguments.length === 0)
+            return;
+
+        inspectedWindow.console.log(object);
+        if (injectedScript._type(object) === "node")
+            InjectedScriptHost.pushNodePathToFrontend(object, false, true);
+        else {
+            switch (injectedScript._describe(object)) {
+                case "Database":
+                    InjectedScriptHost.selectDatabase(object);
+                    break;
+                case "Storage":
+                    InjectedScriptHost.selectDOMStorage(object);
+                    break;
+            }
+        }
+    },
+
+    copy: function(object)
+    {
+        if (injectedScript._type(object) === "node")
+            object = object.outerHTML;
+        InjectedScriptHost.copyText(object);
+    },
+
+    clear: function()
+    {
+        InjectedScriptHost.clearConsoleMessages();
+    },
+
+    _inspectedNode: function(num)
+    {
+        var nodeId = InjectedScriptHost.inspectedNode(num);
+        return injectedScript._nodeForId(nodeId);
+    },
+
+    _normalizeEventTypes: function(types)
+    {
+        if (typeof types === "undefined")
+            types = [ "mouse", "key", "load", "unload", "abort", "error", "select", "change", "submit", "reset", "focus", "blur", "resize", "scroll" ];
+        else if (typeof types === "string")
+            types = [ types ];
+
+        var result = [];
+        for (var i = 0; i < types.length; i++) {
+            if (types[i] === "mouse")
+                result.splice(0, 0, "mousedown", "mouseup", "click", "dblclick", "mousemove", "mouseover", "mouseout");
+            else if (types[i] === "key")
+                result.splice(0, 0, "keydown", "keyup", "keypress");
+            else
+                result.push(types[i]);
+        }
+        return result;
+    },
+
+    _logEvent: function(event)
+    {
+        console.log(event.type, event);
+    }
+}
+
+injectedScript._commandLineAPIImpl = new CommandLineAPIImpl();
+return injectedScript;
+})

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/Inspector.idl
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/Inspector.idl b/weinre.build/vendor/webkit/WebCore/inspector/Inspector.idl
new file mode 100644
index 0000000..80c24db
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/Inspector.idl
@@ -0,0 +1,279 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module core {
+    interface [Conditional=INSPECTOR] Inspector {
+        void addScriptToEvaluateOnLoad(in String scriptSource);
+        void removeAllScriptsToEvaluateOnLoad();
+        void reloadPage(in boolean ignoreCache);
+        void populateScriptObjects();
+
+        void openInInspectedWindow(in String url);
+        void setSearchingForNode(in boolean enabled, out boolean newState);
+        [notify] void frontendReused();
+        [notify] void addNodesToSearchResult(out Array nodeIds);
+        [notify] void bringToFront();
+        [notify] void disconnectFromBackend();
+        [notify] void inspectedURLChanged(out String url);
+        [notify] void domContentEventFired(out double time);
+        [notify] void loadEventFired(out double time);
+        [notify] void reset();
+        [notify] void showPanel(out String panel);
+
+        [notify] void evaluateForTestInFrontend(out long testCallId, out String script);
+        void didEvaluateForTestInFrontend(in long testCallId, in String jsonResult);
+
+        void highlightDOMNode(in long nodeId);
+        void hideDOMNodeHighlight();
+        void highlightFrame(in unsigned long frameId);
+        void hideFrameHighlight();
+        [notify] void updateFocusedNode(out long nodeId);
+
+        void setUserAgentOverride(in String userAgent);
+
+        void getCookies(out Array cookies, out String cookiesString);
+        void deleteCookie(in String cookieName, in String domain);
+
+        // FIXME: dispatch on agents.
+        void startTimelineProfiler();
+        void stopTimelineProfiler();
+
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+        void enableDebugger();
+        void disableDebugger();
+        void enableProfiler();
+        void disableProfiler();
+        void startProfiling();
+        void stopProfiling();
+#endif // ENABLE_JAVASCRIPT_DEBUGGER
+    };
+
+    interface [Conditional=INSPECTOR] Runtime {
+        void evaluate(in String expression, in String objectGroup, in boolean includeCommandLineAPI, out Value result);
+        void getCompletions(in String expression, in boolean includeCommandLineAPI, out Value result);
+        void getProperties(in Object objectId, in boolean ignoreHasOwnProperty, in boolean abbreviate, out Value result);
+        void setPropertyValue(in Object objectId, in String propertyName, in String expression, out Value result);
+        void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);
+    };
+
+    interface [Conditional=INSPECTOR] InjectedScript {
+        void evaluateOnSelf(in String functionBody, in Array argumentsArray, out Value result);
+    };
+
+    interface [Conditional=INSPECTOR] Console {
+        void setConsoleMessagesEnabled(in boolean enabled, out boolean newState);
+        [notify] void addConsoleMessage(out Object messageObj);
+        [notify] void updateConsoleMessageExpiredCount(out unsigned long count);
+        [notify] void updateConsoleMessageRepeatCount(out unsigned long count);
+        void clearConsoleMessages();
+        [notify] void consoleMessagesCleared();
+        void setMonitoringXHREnabled(in boolean enabled);
+    };
+
+    interface [Conditional=INSPECTOR] Network {
+        void cachedResources(out Object resources);
+        void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out boolean success, out String content);
+        void setExtraHeaders(in Object headers);
+
+        [notify] void frameDetachedFromParent(out unsigned long frameId);
+        [notify] void identifierForInitialRequest(out long identifier, out String url, out Object loader, out Value callStack);
+        [notify] void willSendRequest(out long identifier, out double time, out Object request, out Object redirectResponse);
+        [notify] void markResourceAsCached(out long identifier);
+        [notify] void didReceiveResponse(out long identifier, out double time, out String resourceType, out Object response);
+        [notify] void didReceiveContentLength(out long identifier, out double time, out long lengthReceived);
+        [notify] void didFinishLoading(out long identifier, out double finishTime);
+        [notify] void didFailLoading(out long identifier, out double time, out String localizedDescription);
+        [notify] void didLoadResourceFromMemoryCache(out double time, out Object resource);
+        [notify] void setInitialContent(out long identifier, out String sourceString, out String type);
+        [notify] void didCommitLoadForFrame(out Object frame, out Object loader);
+        [notify] void didCreateWebSocket(out unsigned long identifier, out String requestURL);
+        [notify] void willSendWebSocketHandshakeRequest(out unsigned long identifier, out double time, out Object request);
+        [notify] void didReceiveWebSocketHandshakeResponse(out unsigned long identifier, out double time, out Object response);
+        [notify] void didCloseWebSocket(out unsigned long identifier, out double time);
+    };
+
+#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
+    interface [Conditional=INSPECTOR] Database {
+        void getDatabaseTableNames(in long databaseId, out Array tableNames);
+        void executeSQL(in long databaseId, in String query, out boolean success, out long transactionId);
+
+        [notify] void addDatabase(out Object database);
+        [notify] void selectDatabase(out int databaseId);
+        [notify] void sqlTransactionSucceeded(out long transactionId, out Value columnNames, out Value values);
+        [notify] void sqlTransactionFailed(out long transactionId, out Value sqlError);
+    };
+#endif
+
+#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
+    interface [Conditional=INSPECTOR] DOMStorage {
+        void getDOMStorageEntries(in long storageId, out Array entries);
+        void setDOMStorageItem(in long storageId, in String key, in String value, out boolean success);
+        void removeDOMStorageItem(in long storageId, in String key, out boolean success);
+        [notify] void addDOMStorage(out Object storage);
+        [notify] void updateDOMStorage(out int storageId);
+        [notify] void selectDOMStorage(out int storageId);
+    };
+#endif
+
+#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS
+    interface [Conditional=INSPECTOR] ApplicationCache {
+        void getApplicationCaches(out Value applicationCaches);
+        [notify] void updateApplicationCacheStatus(out int status);
+        [notify] void updateNetworkState(out boolean isNowOnline);
+    };
+#endif
+
+    interface [Conditional=INSPECTOR] DOM {
+        void getChildNodes(in long nodeId);
+        void setAttribute(in long elementId, in String name, in String value, out boolean success);
+        void removeAttribute(in long elementId, in String name, out boolean success);
+        void setTextNodeValue(in long nodeId, in String value, out boolean success);
+        void getEventListenersForNode(in long nodeId, out long outNodeId, out Array listenersArray);
+        void copyNode(in long nodeId);
+        void removeNode(in long nodeId, out long outNodeId);
+        void changeTagName(in long nodeId, in String newTagName, out long outNodeId);
+        void getOuterHTML(in long nodeId, out String outerHTML);
+        void setOuterHTML(in long nodeId, in String outerHTML, out long outNodeId);
+        void addInspectedNode(in long nodeId);
+        void performSearch(in String query, in boolean runSynchronously);
+        void searchCanceled();
+        void pushNodeByPathToFrontend(in String path, out long nodeId);
+        void resolveNode(in long nodeId, out Value result);
+        void getNodeProperties(in long nodeId, in Array propertiesArray, out Value result);
+        void getNodePrototypes(in long nodeId, out Value result);
+        void pushNodeToFrontend(in Object objectId, out Value result);
+
+        [notify] void setDocument(out Value root); // FIXME: should be requested from the front-end as getDocument.
+        [notify] void attributesUpdated(out long id, out Array attributes);
+        [notify] void characterDataModified(out long id, out String newValue);
+        [notify] void setChildNodes(out long parentId, out Array nodes);
+        [notify] void setDetachedRoot(out Object root);
+        [notify] void childNodeCountUpdated(out long id, out int newValue);
+        [notify] void childNodeInserted(out long parentId, out long prevId, out Object node);
+        [notify] void childNodeRemoved(out long parentId, out long id);
+    };
+
+    interface [Conditional=INSPECTOR] CSS {
+        void getStylesForNode(in long nodeId, out Value styles);
+        void getComputedStyleForNode(in long nodeId, out Value style);
+        void getInlineStyleForNode(in long nodeId, out Value style);
+        void getAllStyles(out Array styleSheetIds);
+        void getStyleSheet(in String styleSheetId, out Value styleSheet);
+        void getStyleSheetText(in String styleSheetId, out String url, out String text);
+        void setStyleSheetText(in String styleSheetId, in String text, out boolean success);
+        void setPropertyText(in Object styleId, in long propertyIndex, in String text, in boolean overwrite, out Value style);
+        void toggleProperty(in Object styleId, in long propertyIndex, in boolean disable, out Value style);
+        void setRuleSelector(in Object ruleId, in String selector, out Value rule);
+        void addRule(in long contextNodeId, in String selector, out Value rule);
+        void getSupportedCSSProperties(out Array cssProperties);
+        void querySelectorAll(in long documentId, in String selector, out Array result);
+    };
+
+    interface [Conditional=INSPECTOR] Timeline {
+        [notify] void timelineProfilerWasStarted();
+        [notify] void timelineProfilerWasStopped();
+        [notify] void addRecordToTimeline(out Object record);
+    };
+
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+    interface [Conditional=INSPECTOR] Debugger {
+        [notify] void debuggerWasEnabled();
+        [notify] void debuggerWasDisabled();
+
+        [notify] void parsedScriptSource(out String sourceID, out String url, out int lineOffset, out int columnOffset, out int length, out int scriptWorldType);
+        [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage);
+
+        void activateBreakpoints();
+        void deactivateBreakpoints();
+
+        void setJavaScriptBreakpoint(in String url, in int lineNumber, in int columnNumber, in String condition, in boolean enabled, out String breakpointId, out Array locations);
+        void setJavaScriptBreakpointBySourceId(in String sourceId, in int lineNumber, in int columnNumber, in String condition, in boolean enabled, out String breakpointId, out int actualLineNumber, out int actualColumnNumber);
+        void removeJavaScriptBreakpoint(in String breakpointId);
+        [notify] void breakpointResolved(out String breakpointId, out String sourceId, out int lineNumber, out int columnNumber);
+        void continueToLocation(in String sourceId, in int lineNumber, in int columnNumber);
+
+        void stepOver();
+        void stepInto();
+        void stepOut();
+        void pause();
+        [notify] void pausedScript(out Object details);
+        void resume();
+        [notify] void resumedScript(); // FIXME: Make this out parameter of resume if possible.
+
+        void editScriptSource(in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames);
+        void getScriptSource(in String sourceID, out String scriptSource);
+
+        void setPauseOnExceptionsState(in long pauseOnExceptionsState, out long newState);
+
+        void evaluateOnCallFrame(in Object callFrameId, in String expression, in String objectGroup, in boolean includeCommandLineAPI, out Value result);
+        void getCompletionsOnCallFrame(in Object callFrameId, in String expression, in boolean includeCommandLineAPI, out Value result);
+
+#if defined(ENABLE_WORKERS) && ENABLE_WORKERS
+        [notify] void didCreateWorker(out long id, out String url, out boolean isShared);
+        [notify] void didDestroyWorker(out long id);
+#endif // ENABLE_WORKERS
+
+    };
+#endif // ENABLE_JAVASCRIPT_DEBUGGER
+
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+    interface [Conditional=INSPECTOR] BrowserDebugger {
+        void setAllBrowserBreakpoints(in Object breakpoints);
+        void setDOMBreakpoint(in long nodeId, in long type);
+        void removeDOMBreakpoint(in long nodeId, in long type);
+        void setEventListenerBreakpoint(in String eventName);
+        void removeEventListenerBreakpoint(in String eventName);
+        void setXHRBreakpoint(in String url);
+        void removeXHRBreakpoint(in String url);
+    };
+#endif // ENABLE_JAVASCRIPT_DEBUGGER
+
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+    interface [Conditional=INSPECTOR] Profiler {
+        [notify] void profilerWasEnabled();
+        [notify] void profilerWasDisabled();
+
+        void getProfileHeaders(out Array headers);
+        void getProfile(in String type, in unsigned long uid, out Object profile);
+        void removeProfile(in String type, in unsigned long uid);
+        void clearProfiles();
+
+        // FIXME: split into Profiler and HeapProfiler.
+        void takeHeapSnapshot(in boolean detailed);
+        [notify] void addProfileHeader(out Object header);
+        [notify] void addHeapSnapshotChunk(out unsigned long uid, out String chunk);
+        [notify] void finishHeapSnapshot(out unsigned long uid);
+        [notify] void setRecordingProfile(out boolean isProfiling);
+        [notify] void resetProfiles();
+        [notify] void reportHeapSnapshotProgress(out int done, out int total);
+    };
+#endif // ENABLE_JAVASCRIPT_DEBUGGER
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/InspectorFrontendHost.idl
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/InspectorFrontendHost.idl b/weinre.build/vendor/webkit/WebCore/inspector/InspectorFrontendHost.idl
new file mode 100644
index 0000000..6853c7d
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/InspectorFrontendHost.idl
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek <we...@mattlilek.com>
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module core {
+    interface [Conditional=INSPECTOR] InspectorFrontendHost {
+        void loaded();
+        void closeWindow();
+        void disconnectFromBackend();
+        void bringToFront();
+        void inspectedURLChanged(in DOMString newURL);
+
+        void requestAttachWindow();
+        void requestDetachWindow();
+        void setAttachedWindowHeight(in unsigned long height);
+        void moveWindowBy(in float x, in float y);
+        void setExtensionAPI(in DOMString script);
+
+        DOMString localizedStringsURL();
+        DOMString hiddenPanels();
+
+        void copyText(in DOMString text);
+
+        [Custom] DOMString platform();
+        [Custom] DOMString port();
+        [Custom] void showContextMenu(in MouseEvent event, in DOMObject items);
+        void sendMessageToBackend(in DOMString message);
+    };
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/JavaScriptCallFrame.idl
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/JavaScriptCallFrame.idl b/weinre.build/vendor/webkit/WebCore/inspector/JavaScriptCallFrame.idl
new file mode 100644
index 0000000..db0e0a6
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/JavaScriptCallFrame.idl
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module inspector {
+
+    interface [
+        Conditional=JAVASCRIPT_DEBUGGER,
+        OmitConstructor,
+        DontCheckEnums
+    ] JavaScriptCallFrame {
+
+        // Scope type
+        const unsigned short GLOBAL_SCOPE = 0;
+        const unsigned short LOCAL_SCOPE = 1;
+        const unsigned short WITH_SCOPE = 2;
+        const unsigned short CLOSURE_SCOPE = 3;
+        const unsigned short CATCH_SCOPE = 4;
+
+        [Custom] void evaluate(in DOMString script);
+
+        readonly attribute JavaScriptCallFrame caller;
+        readonly attribute long sourceID;
+        readonly attribute long line;
+        readonly attribute long column;
+        readonly attribute [CustomGetter] Array scopeChain;
+        [Custom] unsigned short scopeType(in int scopeIndex);
+        readonly attribute [CustomGetter] Object thisObject;
+        readonly attribute DOMString functionName;
+        readonly attribute [CustomGetter] DOMString type;
+    };
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfile.idl
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfile.idl b/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfile.idl
new file mode 100644
index 0000000..8d4b04a
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfile.idl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module core {
+
+    interface [Conditional=JAVASCRIPT_DEBUGGER, OmitConstructor] ScriptProfile {
+        readonly attribute DOMString title;
+        readonly attribute unsigned long uid;
+        readonly attribute ScriptProfileNode head;
+    };
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfileNode.idl
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfileNode.idl b/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfileNode.idl
new file mode 100644
index 0000000..eff17bd
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/ScriptProfileNode.idl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module core {
+
+    interface [Conditional=JAVASCRIPT_DEBUGGER, OmitConstructor] ScriptProfileNode {
+        readonly attribute DOMString functionName;
+        readonly attribute DOMString url;
+        readonly attribute unsigned long lineNumber;
+        readonly attribute double totalTime;
+        readonly attribute double selfTime;
+        readonly attribute unsigned long numberOfCalls;
+        readonly attribute [CustomGetter] Array children;
+        readonly attribute boolean visible;
+        readonly attribute [CustomGetter] unsigned long callUID;
+    };
+
+}