Git Product home page Git Product logo

timimahoney / decaf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webkit/webkit-http

470.0 470.0 8.0 4.95 GB

Ruby in the browser.

Home Page: http://trydecaf.org

Emacs Lisp 0.06% Objective-C 4.13% JavaScript 21.22% F# 0.01% XML 0.04% Perl 2.18% Python 4.35% PHP 3.12% Shell 0.15% Java 0.24% Ada 0.01% AppleScript 0.01% ActionScript 0.01% C++ 42.41% C 11.18% Fortran 0.01% Component Pascal 0.01% Ruby 10.80% Assembly 0.08% Tcl 0.03%

decaf's People

Contributors

timimahoney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

decaf's Issues

ObjectSpace.each_object

I am happy with decaf, though not much document, I tried exploring it

ObjectSpace.each_object does not work, I wanted to know if it has been intentionally left out or we can expect it in future

Cross-site monkey-patching security

All the pages in a process share the same DOM classes. This means that one site could monkey-patch a class and breach the security of another site. For example:

window.class.send(:define_method, :window) do
  # Here, the script might have access to
  # the Window of another site.
end

There are a few ways to fix this:

  • Run a new Ruby process for each frame
    This seems to be the safest bet, but would require a good amount of work. It may be automatically implemented in a multi-process architecture like Chromium.
  • Define the DOM classes separately for each frame
    This shouldn't require all that much work. Each RB class currently has a static VALUE member that represents its class. We would replace this with a map of DOMWindow to VALUE. Then, we would convert RBObject::rubyClass() to RBObject::rubyClass(DOMWindow*) so that we know which window to get the class for.
  • Run at a safe mode high enough to disable monkey-patching
    I don't think I like this one. Some people might want to patch classes, but they would be out of luck. We may want to raise the safe level anyway, but not because of this issue.

Future and beyond

Hi, first of all, thanks for this awesome work. If there is anything that can take javascript down, it will have to run on the browser first.

Because of that, I would like to ask you if you plan on update decaf to recent webkit (or maybe Blink) and recent ruby version.

It's a shame that very few people know about this project. It's something that should definitely be on spotlight. You rock!

Include useful standard libraries (JSON, Set, Observable, etc.)

require 'set'
>>> "NoMethodError: undefined method `require' for #<Window:0x007f9ff2c33108>"
Kernel.require 'set'
>>> "LoadError: cannot load such file -- set"
Kernel.require 'observable'
>>> "LoadError: cannot load such file -- observable"

I get something like net/http not being available, as the DOM provides interfaces. But things like Set and Observable ought to be available, no?

Run only one website like Fluid?

Gotta say I love this as it stands. If you could make this run only one site (no url bar) ala Fluid it would be great for my purposes.

How does this compare to OpalRb?

Hi @TIMahoney,

Just saw this and thought it was interesting. I'm curious, though, as to how it compares to OpalRb, another project which uses Ruby in place of JavaScript.

I assume that this follows a similar principle as Opal, in that it transpiles Ruby to JavaScript. I'm also curious if this project works outside of WebKit, and if it's active / working anymore.

google.com search result

open google.com search for some stuff, opens the instant result page

if I am clicking on any of the links, it does not take me to it, but if right click, copy the link, open a new window and paste it works

Ajax?

Not finding window.ActiveXObject (expected not to), or window.XMLHttpRequest (kinda surprised).

Are these not part of the webkit idl?

Crashes instantly under 10.7.5

the output from the crash dialog.

Process:         launchd [12964]
Path:            /Applications/Decaf.app/Contents/MacOS/Decaf
Identifier:      org.trydecaf.Decaf
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  launchd [164]

Date/Time:       2013-04-08 16:30:30.163 -0400
OS Version:      Mac OS X 10.7.5 (11G63b)
Report Version:  9

Interval Since Last Report:          61306 sec
Crashes Since Last Report:           4
Per-App Crashes Since Last Report:   4
Anonymous UUID:                      55F94468-2C3D-4E21-BEE9-081C68CCAE55

Crashed Thread:  Unknown

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007fff5fc01028

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit):
    rax: 0x0000000000000055  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
    rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x0000000000000000
      r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
    r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
    rip: 0x00007fff5fc01028  rfl: 0x0000000000010203  cr2: 0x00007fff5fc01028
Logical CPU: 4

Binary images description not available


External Modification Summary:
    Calls made by other processes targeting this process:
    task_for_pid: 1
    thread_create: 0
    thread_set_state: 0
    Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
    Calls made by all processes on this machine:
    task_for_pid: 12150
    thread_create: 2
    thread_set_state: 0

Model: MacBookPro8,2, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2 GHz, 10 GB, SMC 1.69f4
Graphics: AMD Radeon HD 6490M, AMD Radeon HD 6490M, PCIe, 256 MB
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 512 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353737334448302D4348392020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1333 MHz, 0x857F, 0x483634314755363746393333334700000000
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.198.19.22)
Bluetooth: Version 4.0.8f17, 2 service, 18 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: M4-CT256M4SSD2, 256.06 GB
Serial ATA Device: MATSHITADVD-R   UJ-898
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 3
USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfa100000 / 2
USB Device: BRCM2070 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 8
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0245, 0xfa120000 / 4
USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfd100000 / 2
USB Device: Trackball, 0x046d  (Logitech Inc.), 0xc404, 0xfd120000 / 4
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.