CSC/ECE 517 Fall 2014/oss M1454 rss

From Expertiza_Wiki
Jump to navigation Jump to search

Implementing proper JS error reporting

This wiki page contains the implementation of JS error reporting for the Mozilla project using RUST programming language.

Introduction

Mozilla is currently working on a research project called Servo, which is a Web browser engine for a new generation of hardware: mobile devices, multi-core processors and high-performance GPUs. The goal is to create an architecture that is parallel at many levels thereby eliminating common sources of bugs and security vulnerabilities associated with incorrect memory management.

For the new browser Mozilla servo, SpiderMonkey has been used as the JavaScript search engine. SpiderMonkey basically exposes a user-specifiable callback that executes JS and throws an exception that is not caught. But, SpiderMonkey has been written in C/C++. It exposes a user-specifiable callback executing JS that throws an exception that is not caught. Initially, the library (which wraps the C-based mozjs aka SpiderMonkey) named rust-mozjs library sets this callback to a simple function that pushed the error logs on to the terminal. Thus, as a part of our OSS project, based on the requirements, we have presented a way to replace this in Servo with an ErrorEvent interface which has methods that implements the error reporting specification for web browsers.

RUST Programming Language

Servo

Project Description

Implementation Steps

Steps to execute our program

Design Principles

  • Simple: We would try to not complicate the code but keep it simple.
  • Readable: By adding necessary and required comments, we would make our code readable to other programmers.
  • Reusable: We would try and make our code capable of being used in a completely different setting.
  • Efficient: Our code would give the results in reasonable amount of time.

Future work

References