Skip to content

Crossfire 0.3a7 to 0.3a8 migration

firebug-crossfire edited this page Mar 20, 2012 · 1 revision

Crossfire 0.3a8 Migration

From FirebugWiki

Jump to: navigation, search

Contents

Crossfire 0.3a8 Migration Guide

During 0.3a8 development there was a lot of work done to make the protocol more consistent and coherent, as expected, this work brought with it many changes to the protocol and a few changes that are no longer compatible with existing versions of Crossfire. This guide will help ease the transition from using a pre-0.3a8 version of Crossfire, with each affected protocol entity described in its own following section.

backtrace

The backtrace request has been updated to contain the totalFrames count in the response packet.

Action Required

Clients can optionally being using the totalFrames attribute in the response packet.

Details

In pre-0.3a8 versions the response had the form:

Content-Length:6325
\r\n\r\n
{
  "type":"response",
  "command":"backtrace",
  "contextId":"xf0.3::4303985",
  "seq":50,
  "request_seq":49,
  "body": {
            "fromFrame":0,
            "toFrame":1,
	    "frames":[{
                        "index":0,
                        "func":"onload",
                        "script":"http://www.google.ca//event/seq/1",
                        "locals":{"type":"object", "value":{}},
                        "line":2,
                        "scopes":[{"index":0,"frameIndex":0,"object":{"type":"object","handle":348}}]
                      }],
           },
  "running":false,
  "success":true
}

The following has changed:

  • the totalFrames attribute has been added to the response

New response form:

Content-Length:6325
\r\n\r\n
{
  "type":"response",
  "command":"backtrace",
  "contextId":"xf0.3::4303985",
  "seq":50,
  "request_seq":49,
  "body": {
            "fromFrame":0,
            "toFrame":1,
	    "frames":[{
                        "index":0,
                        "func":"onload",
                        "script":"http://www.google.ca//event/seq/1",
                        "locals":{"type":"object", "value":{}},
                        "line":2,
                        "scopes":[{"index":0,"frameIndex":0,"object":{"type":"object","handle":348}}]
                      }],
            "totalFrames":1
           },
  "running":false,
  "success":true
}

changebreakpoint

The changebreakpoint request has been updated to no longer return the complete breakpoint object in the response.

Action Required

Clients must discontinue use of the breakpoint object in the response.

Details

In pre-0.3a8 versions the response had the form:

Content-Length:272
\r\n\r\n
{
  "type":"response",
  "command":"changebreakpoint",
  "seq":26,
  "request_seq":23,
  "body":{
           "handle":4,
           "type":"line",
           "location":{
                        "url":"http://www.google.ca/",
                        "line":2
                      },
           "attributes":{
                          "enabled":true,
                          "condition":null
                        }
         },
  "running":true,
  "success":true
}

The following has changed:

New response form:

Content-Length:272
\r\n\r\n
{
  "type":"response",
  "command":"changebreakpoint",
  "seq":26,
  "request_seq":23,
  "body":{},
  "running":true,
  "success":true
}

deletebreakpoint

The deletebreakpoint request has been updated to no longer provide the complete breakpoint object in the response.

Action Required

Clients must discontinue use of the breakpoint object in the response.

Details

In pre-0.3a8 versions the response had the form:

Content-Length:232
\r\n\r\n
{
  "type":"response",
  "command":"deletebreakpoint",
  "seq":15,
  "request_seq":13,
  "body":{
           "handle":4,
           "type":"line",
           "location":{
                        "url":"http://www.google.ca/",
                        "line":2
                      },
           "attributes":{
                          "enabled":true,
                          "condition":null
                        }
         },
  "running":true,
  "success":true
}

The following has changed:

New response form:

Content-Length:232
\r\n\r\n
{
  "type":"response",
  "command":"deletebreakpoint",
  "seq":15,
  "request_seq":13,
  "body":{},
  "running":true,
  "success":true
}

frame

The frame request has been updated to properly encapsulate the frame object in the response.

Action Required

Clients must discontinue use of the frame object in the root of the response body and begin getting the frame object from the frame attribute in the response.

Details

In pre-0.3a8 versions the response had the form:

Content-Length:6764
\r\n\r\n
{
  "type":"response",
  "command":"frame",
  "contextId":"xf0.3::7322351",
  "seq":34,
  "request_seq":33,
  "body":{
           "index":0,
           "line":19,
           "func":"anonymous",
           "script":"http://www.mozilla.com/js/jquery/jquery.min.js",
           "locals":{"type":"object","value":{},"this":{"type":"object","value":{"classList":{"type":"object","handle":13}}}},
           "scopes":[{"index":0,"frameIndex":0,"object":{"type":"object","handle":"14"}}]
         },
  "running":false,
  "success":true
}

The following has changed:

New response form:

Content-Length:6764
\r\n\r\n
{
  "type":"response",
  "command":"frame",
  "contextId":"xf0.3::7322351",
  "seq":34,
  "request_seq":33,
  "body":{
           "frame":{
                     "index":0,
                     "line":19,
                     "func":"anonymous",
                     "script":"http://www.mozilla.com/js/jquery/jquery.min.js",
                     "locals":{"type":"object","value":{},"this":{"type":"object","value":{"classList":{"type":"object","handle":13}}}},
                     "scopes":[{"index":0,"frameIndex":0,"object":{"type":"object","handle":"14"}}]
                   }
         },
  "running":false,
  "success":true
}

Retrieved from "http://getfirebug.com/wiki/index.php/Crossfire_0.3a8_Migration" Category: Crossfire

Views
Personal tools

Search
Main
Panels
Extensions
Get Involved
Wiki
Toolbox

Powered by MediaWiki