Skip to content
This repository has been archived by the owner on Aug 18, 2018. It is now read-only.

Commit

Permalink
Added some notes for the future.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarnette committed Apr 19, 2008
1 parent 4b91a3f commit d45a2d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/spidermonkey/js_land_proxy.c
Expand Up @@ -105,6 +105,12 @@ static JSBool get(JSContext* js_context, JSObject* obj, jsval id, jsval* retval)
char* name = JS_GetStringBytes(JSVAL_TO_STRING(id)); char* name = JS_GetStringBytes(JSVAL_TO_STRING(id));
VALUE ruby_id = rb_intern(name); VALUE ruby_id = rb_intern(name);


// FIXME: this is necessarily ugly. Maybe we should write something like
// jsval foo = property_expression(context->js, context->global, "Johnson.Generator.create")
// this would make the code where we look up Johnson.Symbol cleaner too (in conversions.c)

// FIXME: we should probably just JS_DefineProperty this, and it shouldn't be enumerable

if(!strcasecmp("__iterator__", name)) { if(!strcasecmp("__iterator__", name)) {
jsval nsJohnson; jsval nsJohnson;
assert(JS_GetProperty(context->js, context->global, "Johnson", &nsJohnson) || JSVAL_VOID == nsJohnson); assert(JS_GetProperty(context->js, context->global, "Johnson", &nsJohnson) || JSVAL_VOID == nsJohnson);
Expand Down

0 comments on commit d45a2d5

Please sign in to comment.