CSC/ECE 517 Fall 2014/oss M1453 sst: Difference between revisions
(→Servo) |
|||
Line 8: | Line 8: | ||
===Developer tools=== | ===Developer tools=== | ||
The Mozilla debugging protocol allows a debugger to connect to a browser, discover what sorts of things are present to debug or inspect, select JavaScript threads to watch, and observe and modify their execution. The protocol provides a unified view of JavaScript, DOM nodes, CSS rules, and the other technologies used in client-side web applications. The protocol ought to be sufficiently general to be extended for use with other sorts of clients (profilers, say) and servers (mail readers; random XULrunner applications). | |||
All communication between debugger (client) and browser (server) is in the form of JSON objects. This makes the protocol directly readable by humans, capable of graceful evolution, and easy to implement using stock libraries. In particular, it should be easy to create mock implementations for testing and experimentation. | |||
The protocol operates at the JavaScript level, not at the C++ or machine level, and assumes that the JavaScript implementation itself is healthy and responsive. The JavaScript program being executed may well have gone wrong, but the JavaScript implementation's internal state must not be corrupt. Bugs in the implementation may cause the debugger to fail; bugs in the interpreted program must not. | |||
===Servo=== | ===Servo=== |
Revision as of 03:45, 27 October 2014
Expand the coverage of the developer tools for inspecting web content in Servo remotely from a Firefox browser - requires the ability to read JavaScript code in Firefox
Background Information
Firefox supports remote debugging - ie. communicating with an arbitrary server that implements a protocol for exposing information about web content. Servo implements a very basic developer tools server that currently supports executing JS remotely and investigating the DOM tree in the document inspector. We want to expand these capabilities by allowing remote modification of the DOM tree, better JS console integration (exposing historical and real-time exceptions), and enabling server->client messages that are not responses to client->server messages.
Developer tools
The Mozilla debugging protocol allows a debugger to connect to a browser, discover what sorts of things are present to debug or inspect, select JavaScript threads to watch, and observe and modify their execution. The protocol provides a unified view of JavaScript, DOM nodes, CSS rules, and the other technologies used in client-side web applications. The protocol ought to be sufficiently general to be extended for use with other sorts of clients (profilers, say) and servers (mail readers; random XULrunner applications).
All communication between debugger (client) and browser (server) is in the form of JSON objects. This makes the protocol directly readable by humans, capable of graceful evolution, and easy to implement using stock libraries. In particular, it should be easy to create mock implementations for testing and experimentation.
The protocol operates at the JavaScript level, not at the C++ or machine level, and assumes that the JavaScript implementation itself is healthy and responsive. The JavaScript program being executed may well have gone wrong, but the JavaScript implementation's internal state must not be corrupt. Bugs in the implementation may cause the debugger to fail; bugs in the interpreted program must not.
Servo
Servo is an experimental web browser layout engine being developed by Mozilla Research, with Samsung porting it to Android and ARMprocessors. The prototype seeks to create a highly parallel environment, in which many components (such as rendering, layout, HTML parsing, image decoding, etc.) are handled by fine-grained, isolated tasks. The project is developed in Rust programming language.
Building and running servo On OS X (homebrew):
brew install automake pkg-config python glfw3 cmake pip install virtualenv
On OS X (MacPorts):
sudo port install python27 py27-virtualenv cmake
On Debian-based Linuxes:
sudo apt-get install curl freeglut3-dev \ libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \ msttcorefonts gperf g++ cmake python-virtualenv \ libssl-dev libglfw-dev
On Fedora:
sudo yum install curl freeglut-devel libtool gcc-c++ libXi-devel \ freetype-devel mesa-libGL-devel glib2-devel libX11-devel libXrandr-devel gperf \ fontconfig-devel cabextract ttmkfdir python python-virtualenv expat-devel \ rpm-build openssl-devel glfw-devel cmake pushd . cd /tmp wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec rpmbuild -bb msttcorefonts-2.5-1.spec sudo yum install $HOME/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm popd
On Arch Linux:
sudo pacman -S base-devel git python2 python2-virtualenv mesa glfw ttf-font cmake
Rust
There are a number of ways to install Rust, but the easiest is to use the rustup script. If you're on Linux or a Mac, all you need to do is this:
$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh
(If you're concerned about curl | sudo sh, check references) If you're on Windows, please download either the 32-bit installer or the 64-bit installer and run it.
Uninstalling Rust
$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh -s -- --uninstall
If you used the Windows installer, just re-run the .exe and it will give you an uninstall option.
Reference : http://doc.rust-lang.org
Download Rust: http://www.rust-lang.org/
Project Description
The project involves the enhancement of
Implementation
Future Scope
- Separate devtools event handling from script handling tasks.
- Implement client server messages to update the attribute values of a HTML node.
- Send a console message to the developer tools server.
- Synchronously fetch the cached messages from tasks.
- Create an error reporter for error logging and notification.
- Dynamic buffering and sending of messages to Developer Tools.
- Support for disparate client reading and writing.
- Send a detailed error message to the client when an error is reported to the tasks.
References
<references/>