Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
final changes for 1.6.0
  • Loading branch information
pmuellr committed Oct 28, 2011
1 parent 50adc4a commit dd2ef1c12c0c922d3f04617698acc7414ec65ab3
Showing 6 changed files with 85 additions and 27 deletions.
@@ -1,14 +1,14 @@
# ---
# weinre is available under *either* the terms of the modified BSD license *or* the
# MIT License (2008). See for full text.
# Copyright (c) 2010, 2011 IBM Corporation
# ---

# weinre version

# some common locations used in the ant scripts
@@ -57,6 +57,7 @@
<delete dir="${TMP}"/>
<delete dir="${CACHED}"/>
<delete dir="${VENDOR}"/>
<delete dir="node_modules"/>

<!-- ============================================================
@@ -528,7 +529,7 @@
<mkdir dir="${OUT}/files/weinre-src"/>
<copy todir="${OUT}/files/weinre-src" file="${OUT}/build-info.txt" />
<copy todir="${OUT}/files/weinre-src/weinre.application"> <fileset dir="../weinre.application" excludes="**/bin/"/></copy>
<copy todir="${OUT}/files/weinre-src/"> <fileset dir="../" excludes="**/bin/, **/out/, **/cached/, **/vendor/, **/tmp/"/></copy>
<copy todir="${OUT}/files/weinre-src/"> <fileset dir="../" excludes="**/bin/, **/out/, **/cached/, **/vendor/, **/tmp/, **/node_modules/"/></copy>
<copy todir="${OUT}/files/weinre-src/weinre.doc"> <fileset dir="../weinre.doc" excludes="**/bin/"/></copy>
<copy todir="${OUT}/files/weinre-src/weinre.server"> <fileset dir="../weinre.server" excludes="**/bin/"/></copy>
<copy todir="${OUT}/files/weinre-src/weinre.web"> <fileset dir="../weinre.web" excludes="**/bin/"/></copy>
@@ -10,6 +10,66 @@ <h2>Downloads</h2>

<p><a href=""></a>

<!-- ======================================================================= -->
<h2>2011/10/28 - version 1.6.0</h2>


<li><p>The Network panel has been added to weinre, which will display information
for any XHRs that you issue.

<li><p>Error handling for some built-in callbacks has been added. The support
is very similar to what's provided in the
<a href="">log-callback-error project</a>,
though the implementation is different.

<li><p>The element highlighter has been modified to show brighter colors.
The colors also now more closely match the Web Inspector colors.
Currently, there are some artifacts in the corners in some cases, but it's not
clear to me this is a huge problem - in fact, maybe it's a feachur. ~shrug~
As part of this clean up, I've made the element highlighter pluggable. If you
think you can do better, it should be pretty straight-forward to code up a
new one. Bring it on.

<li><p>The JavaScript code for weinre has been converted from the "scoop" DSL
format to CoffeeScript. You no longer have a valid excuse for not hacking the

<li><p>The "Test Drive" page of the doc has been removed and replaced with
the new "User Interface" page.

<li><p>weinre now adds an "error" listener to window. For JavaScript engines
that support "window onerror", you will now see a message logged to the console
when an error occurs anywhere in your JavaScript code. Unfortunately, just
as support for "window onerror" is becoming available in JavaScript, the browsers
are neutering it's support. Depending on your browser, you may or may not
see these errors reported, and even if you do, they may not give you <b>any</b>
useful information. Thanks to Ryan Seddon for supplying the following
backgrounder links for your enjoyment:

<li><a href=""></a>
<li><a href=""></a>
<li><a href=""></a>
<li><a href=""></a>


<p>issues resolved:
<li> <a href=""> issue apache/callback issue 1</a> - update the doc
<li> <a href=""> issue phonegap/weinre 41</a> - add support for XHRs on Network panel
<li> <a href=""> issue phonegap/weinre 40</a> - clean up spurious messages in the server console
<li> <a href=""> issue phonegap/weinre 38</a> - cleanup some of the exception handler bits
<li> <a href=""> issue phonegap/weinre 37</a> - Timeout function does not pass arguments
<li> <a href=""> issue phonegap/weinre 35</a> - convert JavaScript in weinre from scoop to CoffeeScript
<li> <a href=""> issue phonegap/weinre 20</a> - add support for window.onerror
<li> <a href=""> issue phonegap/weinre 19</a> - 404 error on /client/index.html in Mac app (incomplete build?)
<li> <a href=""> issue phonegap/weinre 11</a> - provide better error handling - by hook or by crook
<li> <a href=""> issue phonegap/weinre 10</a> - element highlighter code in the target is just awful

<!-- ======================================================================= -->
<h2>2011/07/22 - version 1.5.0</h2>

@@ -52,12 +52,12 @@ instrumentedCallback = (code, callSite) ->
return code.apply(this, arguments)
catch e
console.log "exception in callback: #{e}"
console.log " callsite: #{callSite}"
console.error "exception in callback: #{e}"
console.error " callsite: #{callSite}"

if e.stack
console.log "stack at time of exception:"
console.log e.stack
console.error "stack at time of exception:"
console.error e.stack

throw e

@@ -164,7 +164,7 @@ module.exports = class Target
lineno = event.lineno or "[unknown lineno]"
message = event.message or "[unknown message]"

console.log "error occurred: #{filename}:#{lineno}: #{message}"
console.error "error occurred: #{filename}:#{lineno}: #{message}"

cb_webSocketOpened: () ->
@@ -138,33 +138,30 @@ module.exports = class Timeline
@addRecord_XHRReadyStateChange: (method, url, id, xhr) ->
return unless Timeline.isRunning()

record = {}
record.startTime =
record.category = name: "loading"

if xhr.readyState == XMLHttpRequest.OPENED
record =
type: TimelineRecordType.ResourceSendRequest
category: name: "loading"
identifier: id
url: url
requestMethod: method
record.type = TimelineRecordType.ResourceSendRequest =
identifier: id
url: url
requestMethod: method

else if xhr.readyState == XMLHttpRequest.DONE
record =
type: TimelineRecordType.ResourceReceiveResponse
category: name: "loading"
identifier: id
statusCode: xhr.status
mimeType: xhr.getResponseHeader("Content-Type")
expectedContentLength: xhr.getResponseHeader("Content-Length")
url: url
record.type = TimelineRecordType.ResourceReceiveResponse =
identifier: id
statusCode: xhr.status
mimeType: xhr.getResponseHeader("Content-Type")
expectedContentLength: xhr.getResponseHeader("Content-Length")
url: url

Weinre.wi.TimelineNotify.addRecordToTimeline record

@installGlobalListeners: ->
if applicationCache

0 comments on commit dd2ef1c

Please sign in to comment.